:root {
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --border: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent: #007ffd;
    --accent-light: #e8f0fe;
    --accent-dark: #0052a3;
    --danger: #dc2626;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.flex {
    display:flex;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 24px;
    min-height: 100vh;
}

.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;
}

.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: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.filters {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: self-end;
    justify-content: space-between;
}
.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;
    color: var(--text-secondary);
    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;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-filter:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.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%;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 2px 1px 7px rgb(0 0 0 / 8%);
    border-collapse: collapse;
}
.orders-table thead {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.orders-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table td {
    padding: 14px 16px;
    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;
    color: var(--text-secondary);
    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;
    color: var(--text-secondary);
}

.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;
    color: var(--text-secondary);
}

.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;
    color: var(--text-secondary);
    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;
    padding: 20px;
    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;
    color: var(--text-secondary);
}

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

.text-center {
    text-align: center;
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
}
.orders-header.flex {
    align-items: center;
    justify-content: space-between;
}












/* 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;
    }
}