/* NT Somic loaded via local @font-face in index.html */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'NT Somic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #E7E3DA;
    color: #261C15;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Главный контейнер - с отступами по бокам чтобы не резалось */
.page-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    box-sizing: border-box;
}

/* Page Title — выравнен с section-title по запросу клиента */
.page-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    font-size: 36px;
    line-height: 1.3;
    color: #261C15;
    margin-bottom: 19px;
}

/* Account Section */
.account-section {
    display: flex;
    flex-direction: column;
}

/* Top Section: Profile + Menu Cards - gap 50px как в Figma */
.account-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
}

/* Profile Card - компактный вариант */
.profile-card {
    width: 420px;
    min-height: 545px;
    background: #E7E3DA;
    border-radius: 18px;
    box-shadow: 0px 0px 5px rgba(0,0,0,0.34);
    padding: 32px 35px 32px 35px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    height: 100%;
    justify-content: space-between;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-top {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-row-avatar {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Аватар - компактный */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar img,
.profile-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Поля имя/фамилия рядом с аватаром */
.profile-name-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-group.full-width {
    width: 100%;
}

/* Labels - компактные */
.field-label {
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #9C4124;
    line-height: 1.24;
}

.field-input {
    display: flex;
    align-items: center;
}

/* Input fields - компактные */
.field-input input {
    width: 100%;
    height: 40px;
    border: 2px solid #261C15;
    border-radius: 3px;
    padding: 8px 16px;
    font-family: 'NT Somic', sans-serif;
    font-size: 16px;
    background: transparent;
    color: #261C15;
}

.field-input input:disabled {
    opacity: 0.8;
}

.field-input.short input {
    width: 100%;
}

/* Profile Button - Figma: height 46px, border-radius 10px, font-size 20px, Unbounded Bold */
.btn-primary {
    width: 100%;
    height: 42px;
    background: #9C4124;
    color: #E7E3DA;
    border: none;
    border-radius: 10px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 20px;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #7d3419;
}

.btn-change-data {
    margin-top: auto;
}

/* Menu Cards Wrapper - занимает оставшееся пространство */
.menu-cards-wrapper {
    flex: 1;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.menu-cards-row {
    display: flex;
    gap: 25px;
}

/* Menu Card - border-radius 12px */
.menu-card {
    flex: 1;
    min-height: 260px;
    background: #E7E3DA;
    border-radius: 12px;
    box-shadow: 0px 0px 5px rgba(0,0,0,0.34);
    padding: 28px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s;
}

.menu-card:hover {
    transform: translateY(-2px);
}

/* Первая карточка (Избранное) - акцентная */
.menu-card.accent {
    background: #9C4124;
}

.menu-card.accent .menu-card-title {
    color: #E7E3DA;
}

.menu-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.menu-card-content.align-end {
    align-items: flex-start;
}

/* Card title - Figma: font-size 34px, line-height 39px, Unbounded Medium */
.menu-card-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    font-size: 32px;
    line-height: 37px;
    color: #261C15;
}

.menu-card-icon {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.menu-card-icon img,
.menu-card-icon svg {
    max-width: 180px;
    max-height: 95px;
    height: auto;
    object-fit: contain;
}

/* Section Titles — выравнен с page-title по запросу клиента */
.section-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    font-size: 36px;
    color: #261C15;
    margin-bottom: 37px;
}

/* History Section */
.history-section,
.orders-section {
    display: flex;
    flex-direction: column;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: transparent;
}

.empty-state-icon,
.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
    line-height: 1;
}

.empty-state h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #261C15;
    margin: 0 0 12px 0;
}

.empty-state p {
    font-family: 'NT Somic', sans-serif;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Not Auth Message */
.not-auth-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #E7E3DA;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.not-auth-content {
    text-align: center;
    max-width: 500px;
    padding: 60px 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.not-auth-icon {
    font-size: 80px;
    margin-bottom: 24px;
    line-height: 1;
}

.not-auth-content h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #261C15;
    margin: 0 0 16px 0;
}

.not-auth-content p {
    font-family: 'NT Somic', sans-serif;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

/* === DASHBOARD GRID & CARDS (PC VERSION) === */
.dashboard-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 20px;
    row-gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    width: 100%;
    height: 220px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-card.bg-card {
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-user-drag: none;
    image-rendering: -webkit-optimize-contrast;
}

.dashboard-card::after {
    display: none;
}

.dashboard-card.accent {
    box-shadow: 0 0 0 3px #9C4124;
}

/* Inner content (icon + title) — hidden on desktop, shown on mobile */
.dashboard-card .dc-icon,
.dashboard-card .dc-title {
    display: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* --- Mobile: Variant C tiles --- */
    .dashboard-card {
        height: auto !important;
        background-image: none !important;
        background: #F5F2EC;
        border-radius: 14px;
        padding: 18px 14px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    .dashboard-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(38, 28, 21, 0.1);
    }
    /* Accent state (active section) */
    .dashboard-card.accent {
        background: #9C4124;
        box-shadow: none;
    }
    .dashboard-card.accent .dc-icon svg {
        color: #F5F2EC;
    }
    .dashboard-card.accent .dc-icon {
        background: rgba(245, 242, 236, 0.15);
    }
    .dashboard-card.accent .dc-title {
        color: #F5F2EC;
    }


    /* Show inner content on mobile */
    .dashboard-card .dc-icon,
    .dashboard-card .dc-title {
        display: flex;
    }
    .dc-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: rgba(156, 65, 36, 0.08);
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .dc-icon svg {
        width: 24px;
        height: 24px;
        color: #9C4124;
    }
    .dc-title {
        font-family: 'NT Somic', sans-serif;
        font-weight: 500;
        font-size: 13px;
        line-height: 1.3;
        color: #261C15;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .dashboard-card {
        height: auto !important;
    }
}
