/* =================================
   RESET
================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: #0b0a09;
    color: #ece6d6;
    font-family: "Inter", Arial, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =================================
   MAIN APP
================================= */

.dashboard-app {
    width: 100%;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top right,
            rgba(179, 27, 27, 0.12),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom left,
            rgba(31, 139, 76, 0.1),
            transparent 35%
        ),
        #0b0a09;
}


/* =================================
   HEADER
================================= */

.dashboard-header {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px 34px;

    background: #15110f;
    border-bottom: 1px solid rgba(236, 230, 214, 0.1);

    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 13px;
}

.dashboard-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
}

.dashboard-logo span {
    color: #e8d5a3;
    font-family: "Cinzel", serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

#headerUserName {
    color: #e8d5a3;
    font-weight: 700;
}

#logout {
    padding: 10px 18px;

    color: #fff;
    background: #b31b1b;

    border: none;
    border-radius: 8px;

    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#logout:hover {
    background: #1f8b4c;
    transform: translateY(-1px);
}

#logout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* =================================
   LAYOUT
================================= */

.dashboard-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);

    min-height: calc(100vh - 78px);
}


/* =================================
   SIDEBAR
================================= */

.sidebar {
    padding: 28px 18px;

    background: #15110f;
    border-right: 1px solid rgba(236, 230, 214, 0.09);

    position: sticky;
    top: 78px;

    height: calc(100vh - 78px);
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.sidebar-link {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 15px;

    color: #ece6d6;
    background: transparent;

    border: 1px solid transparent;
    border-radius: 9px;

    font-size: 0.92rem;
    font-weight: 600;
    text-align: left;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(179, 27, 27, 0.14);
    border-color: rgba(179, 27, 27, 0.35);
    transform: translateX(3px);
}

.sidebar-link.active {
    color: #fff;
    background: #b31b1b;
    border-color: #b31b1b;
}

.sidebar-link span {
    width: 24px;
    text-align: center;
}

.back-store-link {
    display: block;

    margin-top: 32px;
    padding: 14px 15px;

    color: #9c8455;
    border-top: 1px solid rgba(236, 230, 214, 0.1);

    font-size: 0.85rem;
    font-weight: 600;
}

.back-store-link:hover {
    color: #e8d5a3;
}


/* =================================
   MAIN CONTENT
================================= */

.dashboard-content {
    min-width: 0;
    padding: 34px;
}


/* =================================
   SECTIONS
================================= */

.dashboard-section {
    display: none;
    animation: fadeSection 0.3s ease;
}

.dashboard-section.active {
    display: block;
}

@keyframes fadeSection {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =================================
   WELCOME CARD
================================= */

.welcome-card {
    padding: 30px;

    background: linear-gradient(
        145deg,
        rgba(61, 15, 22, 0.7),
        rgba(21, 17, 15, 0.95)
    );

    border: 1px solid rgba(179, 27, 27, 0.35);
    border-radius: 16px;

    margin-bottom: 26px;
}

.section-label {
    margin-bottom: 8px;

    color: #9c8455;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.welcome-card h1 {
    margin-bottom: 8px;

    color: #e8d5a3;

    font-family: "Cinzel", serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.welcome-card p:last-child {
    color: #b9ad96;
}


/* =================================
   STATS
================================= */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.stat-card {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 18px;

    padding: 24px;

    color: #ece6d6;
    background: #181513;

    border: 1px solid rgba(236, 230, 214, 0.12);
    border-radius: 14px;

    text-align: left;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #b31b1b;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.stat-icon {
    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    background: rgba(179, 27, 27, 0.15);
    border-radius: 12px;

    font-size: 1.4rem;
}

.stat-card h2 {
    margin-bottom: 6px;

    color: #e8d5a3;
    font-size: 1.05rem;
}

.stat-card p {
    color: #9c8455;
}


/* =================================
   QUICK ACTIONS
================================= */

.quick-actions {
    margin-top: 28px;
    padding: 25px;

    background: #181513;

    border: 1px solid rgba(236, 230, 214, 0.12);
    border-radius: 14px;
}

.quick-actions h2 {
    margin-bottom: 18px;
    color: #e8d5a3;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.quick-action {
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 12px 15px;

    color: #ece6d6;
    background: #100e0d;

    border: 1px solid rgba(236, 230, 214, 0.12);
    border-radius: 9px;

    font-weight: 700;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.quick-action:hover {
    color: #e8d5a3;
    background: rgba(179, 27, 27, 0.12);
    border-color: #b31b1b;
}


/* =================================
   SECTION HEADER
================================= */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 24px;
}

.section-header h1 {
    color: #e8d5a3;
    font-family: "Cinzel", serif;
    font-size: 2rem;
}

.section-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 17px;

    color: #fff;
    background: #b31b1b;

    border: 1px solid #b31b1b;
    border-radius: 8px;

    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.section-button:hover,
.small-button:hover {
    background: #1f8b4c;
    border-color: #1f8b4c;
}


/* =================================
   PROFILE
================================= */

.profile-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 30px;

    padding: 30px;

    background: #181513;

    border: 1px solid rgba(236, 230, 214, 0.12);
    border-radius: 15px;
}

.profile-avatar {
    width: 120px;
    height: 120px;

    display: grid;
    place-items: center;

    color: #fff;
    background: linear-gradient(145deg, #b31b1b, #1f8b4c);

    border: 3px solid #e8d5a3;
    border-radius: 50%;

    font-family: "Cinzel", serif;
    font-size: 3rem;
    font-weight: 700;
}

.profile-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;

    padding: 17px 0;

    border-bottom: 1px solid rgba(236, 230, 214, 0.08);
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-row span {
    color: #9c8455;
}

.profile-row strong {
    color: #ece6d6;
    overflow-wrap: anywhere;
}

.verified-text {
    color: #48c77a !important;
}

.unverified-text {
    color: #ff7373 !important;
}


/* =================================
   LISTS
================================= */

.dashboard-list {
    display: grid;
    gap: 16px;
}

.list-card {
    padding: 22px;

    background: #181513;

    border: 1px solid rgba(236, 230, 214, 0.12);
    border-radius: 13px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.list-card:hover {
    transform: translateY(-2px);
    border-color: rgba(179, 27, 27, 0.75);
}

.list-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.list-card h2 {
    margin-bottom: 8px;
    color: #e8d5a3;
    font-size: 1.05rem;
}

.list-description {
    margin: 14px 0;

    color: #c8c2b5;
    line-height: 1.65;
}

.list-date,
.list-card small {
    color: #9c8455;
    font-size: 0.78rem;
}

.rating-stars {
    color: #f2c94c;
    letter-spacing: 0.08em;
}

.order-status {
    display: inline-block;

    padding: 5px 10px;

    color: #e8d5a3;
    background: rgba(232, 213, 163, 0.08);

    border-radius: 999px;

    font-size: 0.75rem;
}


/* =================================
   EMPTY STATE
================================= */

.loading-box,
.empty-state {
    padding: 55px 25px;

    color: #9c8455;
    background: #181513;

    border: 1px dashed rgba(236, 230, 214, 0.18);
    border-radius: 14px;

    text-align: center;
}

.empty-icon {
    margin-bottom: 14px;
    font-size: 2.4rem;
}

.empty-state h2 {
    margin-bottom: 8px;
    color: #e8d5a3;
}


/* =================================
   SETTINGS
================================= */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.settings-card {
    padding: 26px;

    background: #181513;

    border: 1px solid rgba(236, 230, 214, 0.12);
    border-radius: 14px;
}

.settings-card h2 {
    margin-bottom: 8px;
    color: #e8d5a3;
}

.settings-card p {
    margin-bottom: 20px;
    color: #9c8455;
    line-height: 1.6;
}

.settings-card label {
    display: block;

    margin-bottom: 8px;

    color: #ece6d6;
    font-weight: 700;
}

.settings-card input {
    width: 100%;

    margin-bottom: 15px;
    padding: 13px 14px;

    color: #ece6d6;
    background: #100e0d;

    border: 1px solid rgba(236, 230, 214, 0.16);
    border-radius: 8px;

    outline: none;
}

.settings-card input:focus {
    border-color: #b31b1b;
    box-shadow: 0 0 0 3px rgba(179, 27, 27, 0.13);
}

.settings-card button {
    padding: 12px 18px;

    color: #fff;
    background: #b31b1b;

    border: none;
    border-radius: 8px;

    font-weight: 700;
}

.settings-card button:hover {
    background: #1f8b4c;
}

.settings-card button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-message {
    display: none;

    margin-top: 20px;
    padding: 13px 15px;

    border-radius: 9px;
}

.settings-message:not(:empty) {
    display: block;
}

.settings-message.success {
    color: #d8ffe7;
    background: rgba(31, 139, 76, 0.16);
    border: 1px solid rgba(31, 139, 76, 0.5);
}

.settings-message.error {
    color: #ffd6d6;
    background: rgba(179, 27, 27, 0.16);
    border: 1px solid rgba(179, 27, 27, 0.5);
}


/* =================================
   RESPONSIVE
================================= */

@media (max-width: 1000px) {
    .dashboard-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-header {
        padding: 12px 18px;
    }

    .dashboard-layout {
        display: block;
    }

    .sidebar {
        position: static;

        width: 100%;
        height: auto;

        border-right: none;
        border-bottom: 1px solid rgba(236, 230, 214, 0.09);
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-link {
        justify-content: center;
        text-align: center;
    }

    .dashboard-content {
        padding: 24px 18px;
    }

    .profile-card {
        grid-template-columns: 1fr;
    }

    .profile-avatar {
        margin: auto;
    }

    .profile-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .section-header,
    .list-card-top {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    #headerUserName {
        display: none;
    }

    .dashboard-logo span {
        font-size: 1rem;
    }

    .dashboard-content {
        padding: 20px 14px;
    }

    .welcome-card,
    .profile-card,
    .settings-card {
        padding: 22px 18px;
    }
}

/* =================================
   REVIEW MODAL
================================= */

.review-modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 1000;
}

.review-modal.open {
    display: flex;
}

.review-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(7px);
}

.review-modal-card {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 530px;
    max-height: 90vh;
    overflow-y: auto;

    padding: 32px;

    color: #ece6d6;
    background:
        linear-gradient(
            145deg,
            rgba(25, 20, 18, 0.99),
            rgba(11, 10, 9, 0.99)
        );

    border: 1px solid rgba(179, 27, 27, 0.72);
    border-radius: 17px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 35px rgba(179, 27, 27, 0.12);
}

.review-modal-card h2 {
    margin-bottom: 7px;

    color: #e8d5a3;
    font-family: "Cinzel", serif;
    font-size: 1.8rem;
}

.review-modal-subtitle {
    margin-bottom: 24px;
    color: #9c8455;
}

.review-modal-close {
    position: absolute;
    top: 15px;
    right: 17px;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    color: #ece6d6;
    background: rgba(255, 255, 255, 0.05);

    border: 1px solid rgba(236, 230, 214, 0.14);
    border-radius: 50%;

    font-size: 1.5rem;
    line-height: 1;
}

.review-modal-close:hover {
    color: #fff;
    background: #b31b1b;
}


/* Form */

#reviewForm {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

#reviewForm label,
.rating-label {
    color: #e8d5a3;
    font-size: 0.86rem;
    font-weight: 700;
}

#reviewForm select,
#reviewForm textarea {
    width: 100%;

    padding: 13px 14px;

    color: #ece6d6;
    background: #100e0d;

    border: 1px solid rgba(236, 230, 214, 0.17);
    border-radius: 9px;

    font: inherit;
    outline: none;
}

#reviewForm select:focus,
#reviewForm textarea:focus {
    border-color: #b31b1b;

    box-shadow:
        0 0 0 3px rgba(179, 27, 27, 0.14);
}

#reviewForm select option {
    color: #ece6d6;
    background: #15110f;
}

#reviewForm textarea {
    resize: vertical;
    min-height: 125px;
}


/* Star rating */

.rating-field {
    margin-bottom: 8px;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-top: 8px;
}

.star-btn {
    padding: 0;

    color: #4c463d;
    background: transparent;

    border: 0;

    font-size: 2rem;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.star-btn:hover,
.star-btn.active {
    color: #f4c542;
    transform: scale(1.12);
}


/* Character count */

.review-character-count {
    margin-top: -5px;

    color: #786f62;
    font-size: 0.75rem;
    text-align: right;
}


/* Buttons */

.review-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 12px;
}

.review-submit-button,
.review-delete-button {
    padding: 12px 19px;

    border: 0;
    border-radius: 8px;

    font-weight: 700;
    cursor: pointer;
}

.review-submit-button {
    color: #fff;
    background: #b31b1b;
}

.review-submit-button:hover {
    background: #1f8b4c;
}

.review-delete-button {
    color: #ffb9b9;
    background: rgba(179, 27, 27, 0.15);
    border: 1px solid rgba(179, 27, 27, 0.5);
}

.review-delete-button:hover {
    color: #fff;
    background: #8f1515;
}

.review-submit-button:disabled,
.review-delete-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* Messages */

.review-form-message {
    display: none;

    margin-bottom: 16px;
    padding: 11px 13px;

    border-radius: 8px;

    font-size: 0.84rem;
    line-height: 1.5;
}

.review-form-message:not(:empty) {
    display: block;
}

.review-form-message.success {
    color: #d8ffe7;
    background: rgba(31, 139, 76, 0.17);
    border: 1px solid rgba(31, 139, 76, 0.5);
}

.review-form-message.error {
    color: #ffd6d6;
    background: rgba(179, 27, 27, 0.17);
    border: 1px solid rgba(179, 27, 27, 0.5);
}

.review-form-message.info {
    color: #e8d5a3;
    background: rgba(232, 213, 163, 0.08);
    border: 1px solid rgba(232, 213, 163, 0.23);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .review-modal-card {
        padding: 27px 19px;
    }

    .review-form-actions {
        flex-direction: column-reverse;
    }

    .review-submit-button,
    .review-delete-button {
        width: 100%;
    }
}
.order-details {
    display: grid;
    gap: 9px;

    margin: 18px 0;

    color: #c8c2b5;
}

.order-details strong {
    color: #e8d5a3;
}

.order-status {
    display: inline-flex;

    padding: 6px 11px;

    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pending {
    color: #ffd166;
    background: rgba(255, 209, 102, 0.12);
}

.status-completed {
    color: #65dc8c;
    background: rgba(31, 139, 76, 0.15);
}

.status-cancelled {
    color: #ff8d8d;
    background: rgba(179, 27, 27, 0.15);
}

.cancel-order-btn {
    padding: 10px 15px;

    color: #ffb8b8;
    background: rgba(179, 27, 27, 0.14);

    border: 1px solid rgba(179, 27, 27, 0.5);
    border-radius: 8px;

    font-weight: 700;
}

.cancel-order-btn:hover {
    color: #ffffff;
    background: #b31b1b;
}


