/* ===== CABINET LAYOUT ===== */
.dl-cabinet {
    display: flex;
    min-height: calc(100vh - 84px);
    background: var(--dl-light-bg);
}

/* Sidebar */
.dl-sidebar {
    width: 260px;
    background: var(--dl-black);
    color: var(--dl-white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 84px;
    overflow-y: auto;
}
.dl-sidebar-top {
    padding: 20px 24px;
    border-bottom: 1px solid #222;
}
.dl-sidebar-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--dl-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dl-sidebar-user {
    padding: 20px 24px;
    border-bottom: 1px solid #222;
    text-align: center;
}
.dl-sidebar-avatar {
    width: 64px;
    height: 64px;
    background: var(--dl-primary);
    color: var(--dl-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 10px;
    overflow: hidden;
}
.dl-sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dl-sidebar-username {
    font-size: 16px;
    font-weight: 700;
}
.dl-sidebar-email {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.dl-sidebar-balance {
    padding: 16px 24px;
    border-bottom: 1px solid #222;
    text-align: center;
}
.dl-sidebar-balance-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.05em;
}
.dl-sidebar-balance-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dl-primary);
    margin-top: 4px;
}
.dl-sidebar-balance-value small {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}
.dl-sidebar-timer {
    margin-top: 10px;
}
.dl-timer-label {
    display: block;
    font-size: 11px;
    color: #888;
}
.dl-timer-value {
    font-size: 13px;
    color: #ccc;
}
.dl-timer-value b {
    color: var(--dl-white);
}

.dl-sidebar-nav {
    flex: 1;
    padding: 12px 0;
}
.dl-sidebar-link {
    display: block;
    padding: 12px 24px;
    font-size: 14px;
    color: #bbb;
    transition: var(--dl-transition);
    border-left: 3px solid transparent;
}
.dl-sidebar-link:hover {
    background: #111;
    color: var(--dl-white);
    border-left-color: var(--dl-primary);
}
.dl-sidebar-link.active {
    background: #111;
    color: var(--dl-primary);
    border-left-color: var(--dl-primary);
    font-weight: 700;
}

.dl-sidebar-logout {
    margin: 12px 24px 20px;
    padding: 10px;
    border: 1px solid #333;
    background: transparent;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: var(--dl-transition);
    font-family: var(--dl-font);
}
.dl-sidebar-logout:hover {
    border-color: var(--dl-primary);
    color: var(--dl-primary);
}

/* Content area */
.dl-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dl-topnav {
    display: flex;
    gap: 0;
    background: var(--dl-white);
    border-bottom: 1px solid var(--dl-border-light);
    padding: 0 24px;
    overflow-x: auto;
}
.dl-topnav-link {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dl-text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: var(--dl-transition);
}
.dl-topnav-link:hover {
    color: var(--dl-text);
}
.dl-topnav-link.active {
    color: var(--dl-primary-dark);
    border-bottom-color: var(--dl-primary);
    font-weight: 700;
}

.dl-content-body {
    padding: 24px;
    flex: 1;
}

/* Sections */
.dl-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dl-text);
}
.dl-section-subtitle {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dl-text);
}
.dl-section {
    max-width: 900px;
}

/* Dashboard grid */
.dl-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.dl-dash-card {
    background: var(--dl-white);
    padding: 24px;
    transition: var(--dl-transition);
    border: 1px solid var(--dl-border-light);
    text-decoration: none;
    color: var(--dl-text);
}
.dl-dash-card:hover {
    border-color: var(--dl-primary);
    transform: translateY(-2px);
}
.dl-dash-icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.dl-dash-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.dl-dash-desc {
    font-size: 13px;
    color: var(--dl-text-muted);
}

/* Tables */
.dl-table-wrap {
    background: var(--dl-white);
    border: 1px solid var(--dl-border-light);
    overflow-x: auto;
}
.dl-table {
    width: 100%;
    border-collapse: collapse;
}
.dl-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--dl-text-muted);
    border-bottom: 1px solid var(--dl-border-light);
    font-weight: 700;
}
.dl-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--dl-border-light);
}
.dl-table tr:last-child td {
    border-bottom: none;
}
.dl-table tr:hover {
    background: var(--dl-light-bg);
}
.dl-tx-amount-cell.dl-plus {
    color: var(--dl-primary-dark);
    font-weight: 700;
}
.dl-tx-amount-cell.dl-minus {
    color: #c82333;
    font-weight: 700;
}
.dl-receipt-thumb {
    width: 40px;
    height: 50px;
    object-fit: cover;
}
.dl-plus {
    color: var(--dl-primary-dark);
    font-weight: 700;
}

/* Status badges */
.dl-status {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}
.dl-status-pending {
    background: #fff3cd;
    color: #856404;
}
.dl-status-approved {
    background: rgba(130, 174, 54, 0.15);
    color: var(--dl-primary-dark);
}
.dl-status-rejected {
    background: rgba(220, 53, 45, 0.1);
    color: #c82333;
}

/* Receipt upload */
.dl-upload-box {
    background: var(--dl-white);
    padding: 24px;
    border: 1px solid var(--dl-border-light);
    margin-bottom: 20px;
}
.dl-upload-dropzone {
    border: 2px dashed var(--dl-border);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--dl-transition);
    color: var(--dl-text-muted);
}
.dl-upload-dropzone:hover,
.dl-upload-dropzone.dragover {
    border-color: var(--dl-primary);
    background: rgba(130, 174, 54, 0.05);
    color: var(--dl-primary);
}
.dl-upload-text {
    font-size: 14px;
    margin-top: 8px;
}
.dl-receipt-preview {
    margin-top: 16px;
    text-align: center;
}
.dl-receipt-preview img {
    max-width: 250px;
    max-height: 350px;
}
.dl-upload-meta {
    margin-top: 12px;
}
.dl-upload-msg {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}
.dl-upload-msg.success {
    color: var(--dl-primary-dark);
}
.dl-upload-msg.error {
    color: #c82333;
}

/* Coupons catalog */
.dl-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.dl-filter-search {
    flex: 1;
    min-width: 200px;
}
.dl-balance-info {
    padding: 10px 16px;
    background: var(--dl-black);
    color: var(--dl-white);
    font-size: 14px;
    margin-bottom: 20px;
}
.dl-balance-info strong {
    font-size: 18px;
    color: var(--dl-primary);
}
.dl-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.dl-coupon-card {
    background: var(--dl-white);
    border: 1px solid var(--dl-border-light);
    position: relative;
    transition: var(--dl-transition);
}
.dl-coupon-card:hover {
    border-color: var(--dl-primary);
}
.dl-coupon-image {
    width: 100%;
    height: 150px;
    background: var(--dl-light-bg);
    overflow: hidden;
}
.dl-coupon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dl-coupon-body {
    padding: 14px;
}
.dl-coupon-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.dl-coupon-partner {
    font-size: 13px;
    color: var(--dl-text-muted);
    margin-bottom: 8px;
}
.dl-coupon-discount {
    display: inline-block;
    font-size: 12px;
    color: var(--dl-primary-dark);
    border-left: 2px solid var(--dl-primary);
    padding-left: 8px;
    margin-bottom: 10px;
}
.dl-coupon-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dl-coupon-cost {
    font-size: 17px;
    font-weight: 700;
}
.dl-coupon-cost small {
    font-size: 11px;
    color: var(--dl-text-muted);
    font-weight: 400;
}
.dl-fav-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--dl-text-muted);
}
.dl-fav-btn:hover {
    color: var(--dl-primary);
}
.dl-fav-btn.active {
    color: var(--dl-primary);
}
.dl-coupon-exchange-btn {
    padding: 7px 18px;
    background: var(--dl-primary);
    color: var(--dl-white);
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--dl-font);
    transition: var(--dl-transition);
}
.dl-coupon-exchange-btn:hover {
    background: var(--dl-primary-dark);
}
.dl-coupon-exchange-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* My coupons */
.dl-mycoupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.dl-mycoupon-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--dl-white);
    border: 1px solid var(--dl-border-light);
}
.dl-card-used {
    opacity: 0.6;
}
.dl-mycoupon-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.dl-mycoupon-cost {
    font-size: 13px;
    color: var(--dl-text-muted);
}
.dl-mycoupon-date {
    font-size: 12px;
    color: var(--dl-text-muted);
    margin-top: 4px;
}
.dl-mycoupon-qr img {
    display: block;
    margin: 0 auto;
}

/* Surveys */
.dl-surveys-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.dl-survey-card {
    background: var(--dl-white);
    border: 1px solid var(--dl-border-light);
    padding: 20px;
}
.dl-survey-card.dl-survey-done {
    opacity: 0.6;
}
.dl-survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.dl-survey-header h3 {
    font-size: 17px;
    font-weight: 700;
}
.dl-survey-points {
    font-size: 13px;
    color: var(--dl-primary-dark);
    font-weight: 700;
    border-left: 2px solid var(--dl-primary);
    padding-left: 8px;
}
.dl-survey-desc {
    font-size: 13px;
    color: var(--dl-text-muted);
    margin-bottom: 14px;
}
.dl-survey-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 12px 0;
}
.dl-question-text {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}
.dl-question-options {
    display: flex;
    flex-direction: column;
}
.dl-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--dl-border-light);
    cursor: pointer;
    font-size: 14px;
}
.dl-option:last-child {
    border-bottom: none;
}
.dl-option input {
    accent-color: var(--dl-primary);
}
.dl-survey-submit {
    margin-top: 12px;
}
.dl-survey-completed-badge {
    display: inline-block;
    padding: 6px 14px;
    color: var(--dl-primary-dark);
    border-left: 2px solid var(--dl-primary);
    font-weight: 700;
    font-size: 14px;
}

/* Auth page */
.dl-auth-page {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}
.dl-auth-card {
    background: var(--dl-white);
    max-width: 460px;
    width: 100%;
    padding: 40px;
    border: 1px solid var(--dl-border-light);
}
.dl-auth-intro h1,
.dl-auth-step h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}
.dl-auth-intro-desc {
    font-size: 15px;
    color: var(--dl-text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}
.dl-auth-benefits {
    list-style: none;
    margin-bottom: 24px;
}
.dl-auth-benefits li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--dl-text);
}
.dl-auth-login-link {
    margin-top: 16px;
    font-size: 14px;
    color: var(--dl-text-muted);
    text-align: center;
}
.dl-auth-step {
    display: none;
}
.dl-auth-step.active {
    display: block;
}
.dl-auth-step-desc {
    font-size: 14px;
    color: var(--dl-text-muted);
    margin-bottom: 16px;
}
.dl-input-lg {
    padding: 12px 16px;
    font-size: 16px;
}
.dl-code-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 700;
}
.dl-btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}
.dl-btn-block {
    width: 100%;
}
.dl-btn-text {
    background: none;
    border: none;
    color: var(--dl-primary);
    font-size: 14px;
    cursor: pointer;
    font-family: var(--dl-font);
    padding: 8px;
}
.dl-btn-text:hover {
    text-decoration: underline;
}
.dl-back-btn {
    margin-top: 12px;
}
.dl-auth-msg {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    min-height: 18px;
}
.dl-auth-msg.success {
    color: var(--dl-primary-dark);
}
.dl-auth-msg.error {
    color: #c82333;
}

/* Help & Rules */
.dl-help-list {
    display: flex;
    flex-direction: column;
}
.dl-help-item {
    background: var(--dl-white);
    padding: 16px 20px;
    border: 1px solid var(--dl-border-light);
    margin-bottom: 8px;
}
.dl-help-item h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}
.dl-help-item p {
    font-size: 14px;
    color: var(--dl-text-muted);
}
.dl-rules-content h2 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 6px;
}
.dl-rules-content h2:first-child {
    margin-top: 0;
}
.dl-rules-content p,
.dl-rules-content li {
    font-size: 14px;
    color: var(--dl-text-muted);
    line-height: 1.7;
}
.dl-rules-content ul {
    padding-left: 20px;
}

/* Misc */
.dl-empty {
    color: var(--dl-text-muted);
    padding: 16px 0;
    font-size: 14px;
}
.dl-empty-muted {
    opacity: 0.6;
}
.dl-loading {
    text-align: center;
    padding: 30px;
    color: var(--dl-text-muted);
    font-size: 14px;
}
.dl-mt30 {
    margin-top: 30px;
}

/* Modal */
.dl-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dl-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}
.dl-modal-content {
    position: relative;
    background: var(--dl-white);
    padding: 28px;
    max-width: 400px;
    width: 90%;
    z-index: 1;
}
.dl-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: var(--dl-black);
    color: var(--dl-white);
    border: none;
    font-size: 18px;
    cursor: pointer;
}
.dl-modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.dl-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.dl-qr-img {
    width: 200px;
    height: 200px;
    display: block;
    margin: 16px auto;
}
.dl-qr-hint {
    font-size: 13px;
    color: var(--dl-text-muted);
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .dl-cabinet {
        flex-direction: column;
    }
    .dl-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
    }
    .dl-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 8px;
    }
    .dl-sidebar-link {
        padding: 8px 12px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    .dl-sidebar-link.active {
        border-bottom-color: var(--dl-primary);
        border-left: none;
    }
    .dl-sidebar-logout {
        margin: 8px;
    }
    .dl-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .dl-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dl-coupons-grid,
    .dl-mycoupons-grid {
        grid-template-columns: 1fr;
    }
    .dl-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .dl-auth-card {
        padding: 24px;
    }
}
