/* ======================================================
   RESET
====================================================== */
* {
    box-sizing: border-box;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Arial, sans-serif;
}

body {
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
}

/* ======================================================
   SIDEBAR (LIGHT & MODERN)
====================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #ffffff;              /* LIGHT */
    padding: 20px 16px;
    border-right: 1px solid #e5e7eb;
    color: #0f172a;
}

/* Brand */
.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #0f172a;                    /* FIXED VISIBILITY */
}

/* Navigation */
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.sidebar-nav a.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.sidebar-nav .logout {
    margin-top: 30px;
    color: #dc2626;
}

/* ======================================================
   CONTENT AREA
====================================================== */
.app-content {
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
}

/* ======================================================
   LOGIN PAGE (NO SIDEBAR OFFSET)
====================================================== */
body.login-page .app-content {
    margin-left: 0;
    padding: 0;
}

/* ======================================================
   CARDS
====================================================== */
.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

/* ======================================================
   HEADINGS
====================================================== */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

/* ======================================================
   TABLES
====================================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
}

tr:hover {
    background: #f8fafc;
}

/* ======================================================
   FORMS
====================================================== */
input,
select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* ======================================================
   BUTTONS (SLEEK PRIMARY)
====================================================== */
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background-color: #f1f5ff;
    color: #3730a3;
    border: 1px solid #e0e7ff;
}

.btn-primary:hover {
    background-color: #e0e7ff;
}


/* ======================================================
   FLASH
====================================================== */
.flash-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
}
/* Clickable stat cards */
.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.stat-card small {
    color: #6366f1;
    font-weight: 500;
}
.filter-form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}
/* Container */
.filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

/* Field wrapper */
.filter {
    display: flex;
    flex-direction: column;
}

/* 🔥 FORCE IDENTICAL CONTROL SIZE */
.filters select,
.filters .btn {
    height: 52px;           /* MUST MATCH */
    line-height: 52px;      /* MUST MATCH */
    padding: 0 18px;
    box-sizing: border-box;
}

/* Button specifics */
.filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.filter-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.filter-field {
    display: flex;
    flex-direction: column;
}

/* 🔥 THE REAL FIX */
.filter-apply {
    margin-top: 17px;   /* matches label height + spacing */
    height: 52px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
}

.pagination a.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
.card a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.card a:hover {
    text-decoration: underline;
}
.order-table input,
.order-table select {
    width: 100%;
}

.readonly {
    background: #f8fafc;
    border-color: #e5e7eb;
    color: #334155;
    cursor: not-allowed;
}