/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Inter', sans-serif;
    background: #f4f7fa;
    color: #2c3e50;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: #ecf0f1;
    height: 100vh;
    position: fixed; /* Remove from document flow */
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    overflow-x: hidden; /* Prevent sidebar content overflow */
    z-index: 1000; /* Ensure sidebar is above main content */
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    font-weight: 700;
    background: #3498db;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-item:hover {
    background: #34495e;
}

.sidebar-item.active {
    background: #3498db;
}

.sidebar-item i {
    font-size: 18px;
}

.sidebar-item span {
    font-size: 16px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none; /* Hidden by default */
    position: absolute; /* Position relative to .main-content */
    top: 20px; /* Distance from the top */
    right: 60px; /* Distance from the right */
    background: #3498db;
    border: none;
    color: #fff;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 999; /* Ensure it stays above other content */
}

.sidebar-toggle i {
    font-size: 20px;
}

.sidebar-toggle:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.sidebar-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Hide sidebar-toggle when sidebar is active */
.sidebar.active ~ .main-content .sidebar-toggle {
    display: none; /* Hide toggle button when sidebar is open */
}

/* Main Content */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 30px;
    box-sizing: border-box; /* Ensure padding doesn't increase width */
    overflow-x: hidden; /* Prevent horizontal scroll */
    position: relative; /* Parent for absolute-positioned sidebar-toggle */
}

/* Profile Header */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Header Title */
.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.profile-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    color: #ffffff;
    background: #7f8c8d; /* Default gray for loading */
}

/* Status Colors */
.status-badge.active,
#status-container p.active {
    background: #27ae60; /* Green */
}

.status-badge.editing,
#status-container p.editing {
    background: #e74c3c; /* Red */
}

.status-badge.under-review,
#status-container p.under-review {
    background: #f1c40f; /* Yellow */
}

.status-badge.rejected,
#status-container p.rejected {
    background: #7f8c8d; /* Gray */
}

/* Profile Card Highlight */
.profile-card.status-highlight {
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.profile-card.status-highlight.active {
    border-color: #27ae60; /* Green */
}

.profile-card.status-highlight.editing {
    border-color: #e74c3c; /* Red */
}

.profile-card.status-highlight.under-review {
    border-color: #f1c40f; /* Yellow */
}

.profile-card.status-highlight.rejected {
    border-color: #7f8c8d; /* Gray */
}

/* Profile Actions */
.profile-actions {
    display: flex;
    gap: 10px;
}

.edit-profile-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.edit-profile-btn:hover {
    background: #2980b9;
}

.edit-profile-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.request-edit-btn {
    background: #e67e22;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.request-edit-btn:hover {
    background: #d35400;
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Profile Card */
.profile-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.profile-card:hover {
    transform: translateY(-5px);
}

.profile-card h3 {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.profile-card p {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 500;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-width: 100%;
}

/* Status in Grid */
.profile-card#status-container p#status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    color: #fff;
}

/* UID fix */
.profile-card#uid-container p#uid {
    font-size: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-x: hidden; /* Prevent modal overflow */
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease;
    overflow-x: hidden; /* Prevent modal content overflow */
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input:disabled,
.form-group select:disabled {
    background: #f4f7fa;
    cursor: not-allowed;
}

.save-btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.save-btn:hover {
    background: #2980b9;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal overlay */
#editModal {
    display: none; /* Hidden by default, shown via JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent overlay */
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* Allow scrolling if content overflows */
    backdrop-filter: blur(4px); /* Subtle blur for modern look */
    transition: opacity 0.3s ease-in-out;
}

/* Show modal with smooth fade-in */
#editModal[style*="display: flex"] {
    opacity: 1;
}

/* Modal content */
.modal-content {
    background-color: #ffffff62; /* Dark slate background */
    color: #252534;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 600px; /* Limit width for larger screens */
    max-height: 80vh; /* Prevent overflow on small screens */
    overflow-y: auto; /* Scroll content if needed */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); /* Deep shadow for depth */
    position: relative;
    transform: translateY(0);
    animation: slideIn 0.3s ease-out;
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #a1a1aa; /* Light zinc for visibility */
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px;
}

.modal-close:hover {
    color: #ffffff; /* Bright white on hover */
    transform: scale(1.1);
}

.modal-close:focus {
    outline: 2px solid #3b82f6; /* Blue outline for accessibility */
    outline-offset: 2px;
}

/* Modal title */
.modal-content h2 {
    color: #ffffff; /* White text for contrast */
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px;
    text-align: center;
}

/* Form group */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #000000; /* Light gray for labels */
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Form inputs */
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    color: #252534;
    background-color: #a3a3a35d; /* Slightly lighter dark for inputs */
    border: 1px solid #3f3f46; /* Subtle zinc border */
    border-radius: 8px;
    color: #000000; /* White text */
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #e4e4e4; /* Blue border on focus */
    background-color: #ffffff; /* Slightly brighter on focus */
}

/* Disabled inputs */
.form-group input:disabled,
.form-group select:disabled {
    background-color: #f3f3f36e;
    color: #6b7280; /* Muted gray for disabled text */
    cursor: not-allowed;
}

/* Placeholder text */
.form-group input::placeholder {
    color: #6b7280; /* Muted gray for placeholders */
}

/* Platform icons in modal */
#platformIcons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 12px;
}

#platformIcons img {
    width: 24px;
    height: 24px;
    filter: brightness(0.8); /* Slightly dimmed for dark theme */
    transition: filter 0.2s ease;
}

#platformIcons img:hover {
    filter: brightness(1); /* Brighten on hover */
}

/* Logo preview in modal */
#edit-logo-preview {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    background-color: #2a2a3a; /* Match input background */
    border-radius: 8px;
    padding: 8px;
}

#edit-logo-preview img,
#edit-logo-preview iframe {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
}

#edit-logo-preview p {
    color: #e74c3c; /* Red for errors */
    font-size: 14px;
    margin: 0;
}

/* Save button */
.save-btn {
    width: 100%;
    padding: 12px;
    background-color: #3b82f6; /* Blue primary color */
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.save-btn:hover {
    background-color: #2563eb; /* Darker blue on hover */
    transform: translateY(-1px);
}

.save-btn:active {
    transform: translateY(0);
}

.save-btn:disabled {
    background-color: #4b5e7a; /* Muted blue-gray */
    cursor: not-allowed;
}

/* Spinner in save button */
.save-btn .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* Email input container for alignment */
.email-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Email input styling */
.email-input-container input[type="email"] {
    flex: 1;
    padding-right: 70px; /* Space for tick and button */
}

/* Verification status icon */
#email-verification-status {
    position: absolute;
    right: 45px; /* Adjust based on button width */
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* Verify email button */
.verify-email-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.verify-email-btn:hover {
    background-color: #2980b9;
}

.verify-email-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Ensure modal form inputs have consistent styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%); /* Closed by default on mobile */
        width: 250px; /* Keep fixed width */
    }

    .sidebar.active {
        transform: translateX(0); /* Open when active */
    }

    .sidebar-toggle {
        display: flex; /* Show toggle button on mobile */
    }

    .main-content {
        margin-left: 0;
        width: 100%; /* Full width on mobile */
        padding: 20px; /* Reduced padding for smaller screens */
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 20px;
    }

    .header-title {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }

    .profile-header h1 {
        font-size: 24px;
    }

    .status-badge {
        font-size: 13px;
        padding: 5px 10px;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .edit-profile-btn,
    .request-edit-btn {
        width: 100%;
        text-align: center;
    }

    .profile-card {
        padding: 15px;
    }

    .profile-card p {
        font-size: 16px;
    }

    .profile-card#uid-container p#uid {
        font-size: 14px;
    }
}

/* Specific adjustments for 640x360 and similar small landscape screens */
@media (max-width: 640px) and (max-height: 400px) {
    .sidebar-toggle {
        top: 15px; /* Closer to top for small height */
        right: 15px; /* Closer to edge for accessibility */
        width: 32px; /* Smaller button */
        height: 32px;
        padding: 6px;
    }

    .sidebar-toggle i {
        font-size: 16px; /* Smaller icon */
    }

    .main-content {
        padding: 15px; /* Further reduced padding */
    }

    .profile-header h1 {
        font-size: 20px; /* Smaller title */
    }

    .profile-grid {
        grid-template-columns: 1fr; /* Single column for very small screens */
        gap: 15px;
    }

    .profile-card {
        padding: 12px; /* Compact padding */
    }

    .profile-card p {
        font-size: 14px; /* Smaller text */
    }
}

/* Specific adjustments for 600x1024 and similar portrait screens */
@media (max-width: 600px) and (min-height: 800px) {
    .sidebar-toggle {
        top: 20px; /* Slightly adjusted for taller screens */
        right: 15px; /* Closer to edge */
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .sidebar-toggle i {
        font-size: 18px;
    }

    .main-content {
        padding: 20px;
    }

    .profile-header h1 {
        font-size: 22px;
    }

    .profile-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Slightly smaller columns */
        gap: 15px;
    }

    .profile-card {
        padding: 15px;
    }
}

/* General adjustments for very small screens */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 16px;
        max-height: 90vh;
    }

    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 14px;
    }

    .save-btn {
        padding: 10px;
        font-size: 14px;
    }

    .modal-close {
        font-size: 20px;
        top: 12px;
        right: 12px;
    }

    .profile-header {
        padding: 10px 15px;
    }

    .header-title h1 {
        font-size: 20px;
    }
    .status-badge {
        font-size: 12px;
        padding: 4px 8px;
    }
}
/* Adjustments for 320px screens */
@media (max-width: 320px) {
    .sidebar {
        transform: translateX(-100%); /* Closed by default */
        width: 200px; /* Reduced width for smaller screen */
    }

    .sidebar.active {
        transform: translateX(0); /* Open when active */
    }

    .sidebar-toggle {
        display: flex; /* Show toggle button */
        top: 10px; /* Closer to top */
        right: 10px; /* Closer to edge */
        width: 30px; /* Smaller button */
        height: 30px;
        padding: 5px;
    }

    .sidebar-toggle i {
        font-size: 14px; /* Smaller icon */
    }

    .main-content {
        margin-left: 0;
        width: 100%; /* Full width */
        padding: 10px; /* Minimal padding */
    }

    .profile-header {
        padding: 8px 10px;
    }

    .profile-header h1 {
        font-size: 18px; /* Smaller title */
    }

    .status-badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    .profile-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 10px;
    }

    .profile-card {
        padding: 10px;
    }

    .profile-card p {
        font-size: 13px; /* Smaller text */
    }

    .profile-card#uid-container p#uid {
        font-size: 12px;
    }

    .modal-content {
        width: 98%;
        padding: 12px;
        max-height: 85vh;
    }

    .modal-content h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .form-group input,
    .form-group select {
        padding: 8px;
        font-size: 13px;
    }

    .save-btn {
        padding: 8px;
        font-size: 13px;
    }

    .modal-close {
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}
.ins {
    color: #ff5722; /* --primary-color */
}

.scipe {
    color: #3f51b5; /* --secondary-color */
}
