/* ============================================================
   KHÁNH BEAUTY – Account Dashboard
   account.css | prefix: kb_account_
   ============================================================ */

.kb_account_page {
    padding: 40px 16px;
    background: var(--kb-bg-lt, #f8fafc);
    min-height: 80vh;
    font-family: var(--kb-font, "Plus Jakarta Sans", sans-serif);
}

.kb_account_layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar */
.kb_account_sidebar {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--kb-border, #e2e8f0);
    box-shadow: var(--kb-shadow-sm, 0 4px 16px rgba(15, 23, 42, 0.03));
    position: sticky;
}

.kb_account_user_info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--kb-border-lt, #f1f5f9);
}

.kb_account_avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid var(--kb-pink, #ec4899);
    padding: 3px;
}

.kb_account_name {
    font-size: 18px;
    font-weight: 800;
    color: var(--kb-black, #0f172a);
    margin-bottom: 4px;
}

.kb_account_email {
    font-size: 13px;
    color: var(--kb-text-2, #64748b);
}

.kb_account_nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb_account_nav_item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--kb-text, #1e293b);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
}

.kb_account_nav_item:hover {
    background: var(--kb-bg-gray, #f1f5f9);
    color: var(--kb-black, #0f172a);
}

.kb_account_nav_item.active {
    background: var(--kb-pink-light, #fdf2f8);
    color: var(--kb-pink, #ec4899);
}

.kb_account_nav_item.logout {
    color: #ef4444;
    margin-top: 16px;
}

.kb_account_nav_item.logout:hover {
    background: #fef2f2;
}

/* Main Content */
.kb_account_main {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--kb-border, #e2e8f0);
    box-shadow: var(--kb-shadow-sm, 0 4px 16px rgba(15, 23, 42, 0.03));
}

.kb_account_tab_panel {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.kb_account_tab_panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kb_account_section_title {
    font-size: 24px;
    font-weight: 800;
    color: var(--kb-black, #0f172a);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--kb-border-lt, #f1f5f9);
}

/* Overview Cards */
.kb_account_stats_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.kb_account_stat_card {
    padding: 24px;
    background: var(--kb-bg-lt, #f8fafc);
    border-radius: 16px;
    border: 1px solid var(--kb-border-lt, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 16px;
}

.kb_account_stat_icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--kb-pink-light, #fdf2f8);
    color: var(--kb-pink, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb_account_stat_val {
    font-size: 24px;
    font-weight: 800;
    color: var(--kb-black, #0f172a);
}

.kb_account_stat_lbl {
    font-size: 13.5px;
    color: var(--kb-text-2, #64748b);
    margin-top: 4px;
}

/* Table styles */
.kb_account_table_wrap {
    overflow-x: auto;
}

.kb_account_table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.kb_account_table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--kb-bg-lt, #f8fafc);
    color: var(--kb-text-2, #64748b);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--kb-border, #e2e8f0);
}

.kb_account_table td {
    padding: 16px;
    border-bottom: 1px solid var(--kb-border-lt, #f1f5f9);
    vertical-align: middle;
    font-size: 14px;
    color: var(--kb-text, #1e293b);
}

.kb_account_table tr:last-child td {
    border-bottom: none;
}

.kb_account_table tr:hover td {
    background: var(--kb-bg-gray, #f1f5f9);
}

/* Status Badges */
.kb_status_badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.kb_status_pending {
    background: #fef3c7;
    color: #d97706;
}

.kb_status_processing {
    background: #dbeafe;
    color: #2563eb;
}

.kb_status_shipping {
    background: #e0e7ff;
    color: #4f46e5;
}

.kb_status_completed {
    background: #d1fae5;
    color: #059669;
}

.kb_status_cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* Form Styles */
.kb_account_form {
    margin-top: 16px;
}

.kb_account_form_row {
    display: flex;
    gap: 16px;
}

.kb_account_form_row .kb_account_form_group {
    flex: 1;
}

.kb_account_form_group {
    margin-bottom: 16px;
}

.kb_account_form_group label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--kb-text, #1e293b);
    margin-bottom: 8px;
}

.kb_account_form_group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--kb-border, #e2e8f0);
    background: #ffffff;
    font-size: 14px;
    color: var(--kb-black, #0f172a);
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.kb_account_form_group input:focus {
    outline: none;
    border-color: var(--kb-pink, #ec4899);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.kb_account_form_group input[type="file"] {
    padding: 10px;
    background: var(--kb-bg-lt, #f8fafc);
    cursor: pointer;
}

.kb_account_submit_btn {
    background: linear-gradient(135deg, var(--kb-pink, #ec4899), #d81b60);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
    transition: all 0.2s;
}

.kb_account_submit_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.35);
}

/* Wishlist Grid */
.kb_account_wishlist_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.kb_account_wishlist_card {
    border: 1px solid var(--kb-border, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.kb_account_wishlist_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.kb_account_wishlist_img {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--kb-bg-lt, #f8fafc);
    overflow: hidden;
}

.kb_account_wishlist_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kb_account_wishlist_card:hover .kb_account_wishlist_img img {
    transform: scale(1.05);
}

.kb_account_wishlist_info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kb_account_wishlist_title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--kb-black, #0f172a);
    text-decoration: none;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.kb_account_wishlist_title:hover {
    color: var(--kb-pink, #ec4899);
}

.kb_account_wishlist_price {
    font-size: 15px;
    font-weight: 800;
    color: var(--kb-pink, #ec4899);
    margin-bottom: 16px;
    margin-top: auto;
}

.kb_account_wishlist_actions {
    display: flex;
    gap: 8px;
}

.kb_account_wishlist_remove {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.kb_account_wishlist_remove:hover {
    background: #fee2e2;
    color: #ef4444;
}

.kb_account_wishlist_add_cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    background: var(--kb-pink, #ec4899);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.kb_account_wishlist_add_cart:hover {
    background: #d81b60;
}

/* Responsive */
@media (max-width: 900px) {
    .kb_account_layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .kb_account_sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .kb_account_page {
        padding: 24px 12px;
    }

    .kb_account_sidebar,
    .kb_account_main {
        padding: 20px 16px;
    }

    .kb_account_stats_grid {
        grid-template-columns: 1fr;
    }

    .kb_account_form_row {
        flex-direction: column;
        gap: 0;
    }
}
