﻿.orders-page {
    height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px;
    padding-bottom: 80px;
}

.orders-grid {
    display: block;
    min-height: 100%;
}

.customer-top-panel {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr) 260px;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(15,23,42,0.68);
    border: 1px solid rgba(148,163,184,0.16);
    box-shadow: 0 12px 34px rgba(0,0,0,0.18);
}

.customer-search-area,
.customer-info-area,
.customer-stat-area {
    min-width: 0;
}

    .customer-search-area .customer-search-box {
        position: relative;
        margin-top: 14px;
    }

.customer-info-area {
    padding: 16px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37,99,235,0.24), rgba(14,165,233,0.14));
    border: 1px solid rgba(96,165,250,0.24);
}

.customer-big-code {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 900;
    color: #f8fafc;
}

.customer-big-name {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 800;
    color: #93c5fd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-stat-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.panel-card {
    border-radius: 24px;
    background: rgba(15,23,42,0.68);
    border: 1px solid rgba(148,163,184,0.16);
    box-shadow: 0 12px 34px rgba(0,0,0,0.18);
    padding: 18px;
    min-width: 0;
}

.panel-title {
    font-size: 20px;
    font-weight: 800;
    color: #f8fafc;
}

.panel-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #94a3b8;
}

.orders-list-card,
.detail-card {
    margin-bottom: 18px;
}

.orders-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.segmented {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

    .segmented .btn {
        padding: 10px 14px;
        border-radius: 14px;
        background: rgba(255,255,255,0.06);
        color: #cbd5e1;
    }

        .segmented .btn.active {
            background: linear-gradient(135deg, #111827, #1f2937);
            color: #fff;
        }

.mini-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 14px;
    padding: 10px 14px;
}

    .mini-stat span {
        color: #94a3b8;
        font-size: 12px;
    }

    .mini-stat strong {
        color: #fff;
        font-size: 18px;
    }

.orders-table-wrap {
    max-height: 420px;
    overflow: auto;
}

.detail-table-wrap {
    max-height: 360px;
    overflow: auto;
}

.detail-card .data-table {
    min-width: 1000px;
    table-layout: fixed;
}

    .detail-card .data-table th:nth-child(1),
    .detail-card .data-table td:nth-child(1) {
        width: 55px;
    }

    .detail-card .data-table th:nth-child(2),
    .detail-card .data-table td:nth-child(2) {
        width: 150px;
    }

    .detail-card .data-table th:nth-child(3),
    .detail-card .data-table td:nth-child(3) {
        width: 380px;
    }

    .detail-card .data-table th:nth-child(4),
    .detail-card .data-table td:nth-child(4) {
        width: 95px;
        text-align: right;
    }

    .detail-card .data-table th:nth-child(5),
    .detail-card .data-table td:nth-child(5) {
        width: 65px;
        text-align: center;
    }

    .detail-card .data-table th:nth-child(6),
    .detail-card .data-table td:nth-child(6) {
        width: 120px;
        text-align: right;
    }

    .detail-card .data-table th:nth-child(7),
    .detail-card .data-table td:nth-child(7) {
        width: 140px;
        text-align: right;
    }

    .detail-card .data-table td:nth-child(3) {
        color: #e5e7eb;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .detail-card .data-table td:nth-child(3):hover {
            white-space: normal;
            background: rgba(59,130,246,0.08);
        }

.quick-actions-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 18px 0 70px 0;
}

    .quick-actions-bottom .quick-button {
        min-height: 82px;
    }

.customer-hero-banner {
    padding: 18px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(37,99,235,0.28), rgba(14,165,233,0.20));
    border: 1px solid rgba(96,165,250,0.28);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    min-width: 0;
}

    .customer-hero-banner.compact {
        margin: 0;
        padding: 16px 22px;
    }

.customer-hero-title {
    font-size: 28px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-hero-sub {
    margin-top: 8px;
    font-size: 13px;
    color: #dbeafe;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-hero-with-balance {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 18px;
    align-items: center;
}

.customer-balance-inline {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.balance-mini {
    min-width: 130px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15,23,42,0.45);
    border: 1px solid rgba(148,163,184,0.16);
}

.balance-mini-title {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 800;
}

.balance-mini-value {
    margin-top: 4px;
    font-size: 15px;
    color: #fff;
    font-weight: 900;
}

.balance-mini.balance-positive {
    border-color: rgba(34,197,94,0.25);
}

.balance-mini.balance-negative {
    border-color: rgba(239,68,68,0.25);
}

.movement-table {
    min-width: 1200px !important;
    table-layout: fixed !important;
}

    .movement-table th:nth-child(1),
    .movement-table td:nth-child(1) {
        width: 95px !important;
    }

    .movement-table th:nth-child(2),
    .movement-table td:nth-child(2) {
        width: 95px !important;
    }

    .movement-table th:nth-child(3),
    .movement-table td:nth-child(3) {
        width: 140px !important;
    }

    .movement-table th:nth-child(4),
    .movement-table td:nth-child(4) {
        width: 420px !important;
    }

    .movement-table th:nth-child(5),
    .movement-table td:nth-child(5) {
        width: 100px !important;
    }

    .movement-table th:nth-child(6),
    .movement-table td:nth-child(6),
    .movement-table th:nth-child(7),
    .movement-table td:nth-child(7),
    .movement-table th:nth-child(8),
    .movement-table td:nth-child(8) {
        width: 130px !important;
        text-align: right;
    }
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 14px 0 18px 0;
}

.order-info-card {
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(15,23,42,0.72);
    border: 1px solid rgba(148,163,184,0.12);
}

    .order-info-card span {
        display: block;
        font-size: 11px;
        color: #94a3b8;
        font-weight: 700;
    }

    .order-info-card strong {
        display: block;
        margin-top: 6px;
        font-size: 14px;
        color: #f8fafc;
    }

@media (max-width: 768px) {

    body {
        font-size: 18px;
    }

    .login-card,
    .login-box,
    .auth-card {
        width: calc(100vw - 28px);
        max-width: none;
        padding: 28px 22px;
        border-radius: 24px;
    }

    .login-title,
    .auth-title {
        font-size: 32px;
    }

    .login-subtitle,
    .auth-subtitle {
        font-size: 17px;
    }

    input,
    select,
    textarea {
        min-height: 56px;
        font-size: 18px;
        border-radius: 14px;
    }

    button,
    .btn {
        min-height: 58px;
        font-size: 18px;
        border-radius: 16px;
    }

    #loginError {
        font-size: 16px;
    }
}