:root {
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --border: #e9ecef;
    --text-primary: #000;
    --text-secondary: #6c757d;
    --accent: #007ffd;
    --accent-light: #e8f0fe;
    --accent-dark: #0052a3;
    --danger: #dc2626;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --gray: #a9a9a9;
}
body {
    font-family: "Roboto";
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 24px;
    min-height: 100vh;
    font-size: 14px;
}
.logo a {
    color: var(--accent);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .1em;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}
a {
    text-decoration: none;
}
input[type="text"], input[type="tel"], select, textarea, input[type="number"] {
    padding: 8px 20px;
    border-radius: 30px;
    border: none;
    background: var(--bg-light);
    font-size: 14px;
}
textarea {
    width: 100%;
    max-width: 497px;
    font-size: 14px;
}
input:focus {
    border: 1px solid #ccc;
}
.flex {
    display:flex;
}
.grid {
    display: grid;
}

.grid-2col {
    grid-template-columns: repeat(2, 1fr);
}
.grid-3col {
    grid-template-columns: repeat(3, 1fr);
}
.grid-4col {
    grid-template-columns: repeat(4, 1fr);
}
.grid-5col {
    grid-template-columns: repeat(5, 1fr);
}
.grid-6col {
    grid-template-columns: repeat(6, 1fr);
}

.gap15 {
    gap: 15px;
}
.gap30 {
    gap: 30px;
}

.mtop20 {
    margin-top: 20px;
}
.mtop30 {
    margin-top: 30px;
}
.mtop40 {
    margin-top: 40px;
}
.mtop60 {
    margin-top: 60px;
}
.mtop80 {
    margin-top: 80px;
}
.mtop100 {
    margin-top: 100px;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav {
    display: flex;
    gap: 8px;
}
.nav-link {
    color: #000;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 15px;
    transition: all 0.2s;
    font-weight: normal;
}
.nav-link:hover {
    background: var(--bg-light);
    color: var(--accent);
}
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary {
    background: var(--accent);
    color: white;
    line-height: 1.5;
}
.btn-primary:hover {
    opacity: .7;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Stats Cards */
.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 24px;
}
.form-actions {
    padding: 24px;
    display: flex;
    justify-content: flex-end;
}
.stat-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: 3px 3px 12px rgb(0 127 253 / 2%);
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}
footer.footer {
    letter-spacing: .1em;
}
.tx-right, .orders-table th.tx-right{
    text-align: right;
}
.stat-label {
    font-size: 13px;
}
@keyframes pulsed{
    0%{
        -moz-box-shadow:0 0 0 0 rgba(53,122,247,.7);
        box-shadow:0 0 0 0 rgba(53,122,247,.7)
    }
    70%{
        -moz-box-shadow:0 0 0 15px rgba(53,122,247,0);
        box-shadow:0 0 0 15px rgba(53,122,247,0)
    }
    to{
        -moz-box-shadow:0 0 0 0 rgba(53,122,247,0);
        box-shadow:0 0 0 0 rgba(53,122,247,0)
    }
}
span.status-badge.status-new {
    animation: pulsed 1.5s infinite;
}
.filters {
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: self-end;
    justify-content: space-between;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: 3px 3px 12px rgb(0 127 253 / 2%);
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    max-width: calc(1020px - 200px);
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-group input, .filter-group select {
    padding: 8px 12px;
    background: var(--accent-light);
    border: none;
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 14px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 15px;
    
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-filter:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}
.orders-header {
    padding: 24px;
}
.btn-search {
    padding: 8px 20px;
    background: var(--accent);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: none;
}
.orders-table {
    width: 100%;
    overflow: hidden;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 20px;
    transition: all 0.2s;
    box-shadow: 3px 3px 12px rgb(0 127 253 / 2%);
}
.orders-table thead {
    border-bottom: 1px solid var(--border);
}
.orders-table th {
    padding: 14px 24px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.orders-table td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.orders-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    color: #0c5460;
}

.status-processing {
    color: #856404;
}

.status-completed {
    color: #155724;
}

.status-canceled {
    color: #721c24;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-link {
    padding: 8px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 15px;
    
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover,
.page-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideIn 0.3s;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Forms */
.form-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.form-card-header {
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.form-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-card-body {
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.delivery-fields {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
}

.delivery-fields h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    
}

.btn-add-item {
    background: var(--success);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 16px;
}

.btn-add-item:hover {
    background: #218838;
}

.btn-remove-item {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.total-row {
    text-align: right;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 18px;
    font-weight: 600;
}

.total-row span {
    color: var(--accent);
}

/* Footer */
.footer {
    margin-top: 48px;
    padding: 24px;
    text-align: center;
    
    font-size: 13px;
    border-top: 1px solid var(--border);
}
.search-group {
    flex: 1;
    max-width: 400px;
}
.search-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-wrapper input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    font-size: 14px;
}

.btn-reset {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-reset:hover {
    background: #5a6268;
}

.text-center {
    text-align: center;
}
.search-group {
    flex: 1;
    min-width: 250px;
}

.search-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-wrapper input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    background: var(--accent-light);
}
.btn-reset {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-reset:hover {
    background: #5a6268;
}

.text-center {
    text-align: center;
}
.orders-header h2 {
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.customer-top.flex {
    justify-content: space-between;
    padding: 0 0 20px;
}
.customer-info {
    margin-bottom: 30px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.info-card h3 {
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--text-primary);
}

.info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 150px;
    font-weight: 600;
    
}

.info-value {
    flex: 1;
    color: var(--text-primary);
}

.text-center {
    text-align: center;
}
.orders-header.flex {
    align-items: center;
    justify-content: space-between;
}
.header-top.flex {
    align-items: center;
    justify-content: space-between;
}

.order-info.flex {
    font-size: 14px;
    gap: 40px;
}
.ord-i-item {
    background: #fff;
    padding: 5px 15px;
    border-radius: 20px;
}
.card-header {
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.card-body {
    padding: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color:var(--gray);
}

.info-group span {
    font-size: 15px;
    color: #1a1a2e;
    font-weight: 500;
}

.delivery-info,
.customer-info,
.items-info{
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.delivery-info h4,
.customer-info h4,
.items-info h4,
.comment-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
}
.btn-secondary {
    background: #6c757d14;
    color: #000000;
    margin-left: 8px;
}
.btn-secondary:hover {
    opacity: .8;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th,
.items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.items-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
}

.items-table tfoot th,
.items-table tfoot td {
    border-top: 2px solid #dee2e6;
    border-bottom: none;
    font-weight: 600;
}

.comment-info p {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0;
    line-height: 1.5;
}
a.btn-ghost {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    color: var(--text-primary);
}
a.btn-ghost:hover {
    border: 1px solid var(--accent);
    color: var(--accent);
}
.oi-col {
    padding: 24px;
    border-radius: 20px;
    transition: all 0.2s;
    box-shadow: 3px 3px 12px rgb(0 127 253 / 2%);
    background: #fff;
}
.comment-info {
    padding: 24px;
    border-radius: 20px;
    transition: all 0.2s;
    box-shadow: 3px 3px 12px rgb(0 127 253 / 2%);
    background: #fff;
    margin-top: 24px;
}
.cell-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color:var(--gray);
}
.sep {
    margin: 0 24px;
    border-bottom:1px solid var(--border);
}









/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .statistics {
        grid-template-columns: 1fr;
    }
    
    .orders-table {
        font-size: 12px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 10px 8px;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
}