:root {
    --primary: #232F3E;
    --accent: #FF9900;
    --success: #067D62;
    --warning: #F0AD4E;
    --danger: #D13212;
    --bg: #F5F7FA;
    --card-bg: #FFFFFF;
    --text: #16191F;
    --text-secondary: #5F6B7A;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    padding: 0;
    min-height: 100vh;
}

/* Header */
header {
    background-color: var(--primary);
    color: #ffffff;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

#mock-badge,
.badge-mock {
    background-color: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-live {
    background-color: var(--success);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Stats Section */
#stats-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions Section */
#actions-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

#actions-section button {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#actions-section button:hover {
    background-color: #e68a00;
    transform: translateY(-1px);
}

#actions-section button:active {
    transform: translateY(0);
}

#actions-section button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Notifications */
.notification {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.notification-info {
    background-color: #E3F2FD;
    color: #1565C0;
    border-left: 4px solid #1565C0;
}

.notification-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid var(--success);
}

.notification-error {
    background-color: #FFEBEE;
    color: #C62828;
    border-left: 4px solid var(--danger);
}

.hidden {
    display: none;
}

/* Section Titles */
#orders-section h2,
#shipments-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

/* Table Controls */
.table-controls {
    margin-bottom: 12px;
}

.table-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: var(--card-bg);
    color: var(--text);
    cursor: pointer;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 32px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

thead tr {
    background-color: #f0f2f5;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid #e0e0e0;
}

td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

tbody tr:hover {
    background-color: #f0f4ff;
    transition: background-color 0.15s ease;
}

.order-id,
.tracking-number {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 32px 16px !important;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-unshipped {
    background-color: #FFF3E0;
    color: #E65100;
}

.status-shipped {
    background-color: #E3F2FD;
    color: #1565C0;
}

.status-intransit {
    background-color: #FFF8E1;
    color: #F57F17;
}

.status-delivered {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status-cancelled {
    background-color: #FFEBEE;
    color: #C62828;
}

.status-labelcreated {
    background-color: #F3E5F5;
    color: #6A1B9A;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #stats-section {
        flex-direction: column;
    }

    #actions-section {
        flex-direction: column;
    }

    #actions-section button {
        width: 100%;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    main {
        padding: 16px;
    }
}
