* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2937;
    min-height: 100vh;
}

.ev-wrap {
    max-width: 420px;
    margin: 80px auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ev-wrap.wide {
    max-width: 1100px;
}

.ev-logo {
    font-size: 22px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 4px;
}

.ev-sub {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 28px;
}

.ev-field {
    margin-bottom: 18px;
}

.ev-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.ev-field input, .ev-field select, .ev-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.ev-field input:focus, .ev-field select:focus, .ev-field textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.ev-btn {
    width: 100%;
    padding: 11px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ev-btn:hover { background: #4338ca; }

.ev-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid #fecaca;
}

.ev-success {
    background: #f0fdf4;
    color: #15803d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid #bbf7d0;
}

.ev-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 13px;
}

.ev-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

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

.ev-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
}

.ev-card .num {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.ev-card .label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

table.ev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.ev-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
}

table.ev-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.ev-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ev-badge.pending { background: #fef9c3; color: #854d0e; }
.ev-badge.active { background: #dcfce7; color: #15803d; }
.ev-badge.suspended { background: #fee2e2; color: #b91c1c; }

/* Load status row coloring */
tr.row-open { background: #fee2e2; }
tr.row-dispatched { background: #dbeafe; }
tr.row-delivered { background: #ccfbf1; }
tr.row-completed { background: #ffffff; }
tr.row-cancelled { background: #f3f4f6; color: #9ca3af; }

.ev-status-select {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.15);
}
.ev-status-select.st-open { background: #fecaca; color: #991b1b; }
.ev-status-select.st-dispatched { background: #bfdbfe; color: #1e3a8a; }
.ev-status-select.st-delivered { background: #99f6e4; color: #115e59; }
.ev-status-select.st-completed { background: #e5e7eb; color: #374151; }
.ev-status-select.st-cancelled { background: #e5e7eb; color: #9ca3af; }

.ev-home-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #4f46e5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.ev-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.ev-search-bar input[type=text] {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}
.ev-search-bar select {
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.ev-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}
.ev-tab {
    padding: 10px 18px;
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}
.ev-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}
