/* ===== Profile Layout ===== */
.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 120px;
    padding-bottom: 4rem;
    min-height: calc(100vh - 100px);
    align-items: flex-start;
}

/* Sidebar */
.profile-sidebar {
    width: 100%;
    max-width: 100%;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    flex-shrink: 0;
    position: relative;
}

.profile-sidebar-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-avatar {
    width: 100px;
    max-width: 100%;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--accent-primary);
    padding: 3px;
    background: var(--surface-dark);
}

.sidebar-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.sidebar-email {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.sidebar-balance {
    background: rgba(125, 42, 232, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(125, 42, 232, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.sidebar-balance strong {
    color: var(--accent-primary);
    font-size: 1.1rem;
}

/* Sidebar Nav */
.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    border-radius: 12px;
    cursor: pointer;
    min-height: 44px;
    /* Touch target */
    transition: all 0.3s ease;
}

.profile-nav-btn .nav-icon {
    font-size: 1.25rem;
}

.profile-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.profile-nav-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* Content Area */
.profile-content {
    flex-grow: 1;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    min-height: 500px;
}

.profile-tab {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.profile-tab.active {
    display: block;
}

.profile-tab-title {
    font-size: 1.75rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 700;
}

.profile-section-title {
    font-size: 1.25rem;
    color: var(--text-light);
    margin: 2.5rem 0 1.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Forms */
.profile-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-form label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.profile-form input {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(125, 42, 232, 0.2);
}

.profile-form input:disabled,
.profile-form input[readonly] {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
}

.profile-table th,
.profile-table td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.profile-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-table tbody tr {
    transition: background 0.3s ease;
}

.profile-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.profile-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.profile-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.approved,
.status-badge.delivered {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
    .profile-layout {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
        max-width: 100%;
        position: static;
        display: flex;
        flex-direction: column;
    }

    .profile-sidebar-header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .profile-nav-btn {
        white-space: nowrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .profile-form .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-layout {
        gap: 1rem;
    }

    .profile-content {
        padding: 1rem;
        border-radius: 16px;
    }

    .profile-sidebar {
        padding: 1rem;
        border-radius: 16px;
    }

    .profile-sidebar-header {
        margin-bottom: 1rem;
    }

    .profile-nav-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .profile-table th,
    .profile-table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* ===== Mobile First Breakpoints ===== */
@media (min-width: 768px) {
    .profile-layout {
        flex-direction: row;
        gap: 2rem;
    }
    .profile-sidebar {
        max-width: 280px;
        position: sticky;
        top: 100px;
    }
    .profile-form .form-row {
        flex-direction: row;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
}
