* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; }

.tabs { display: flex; background: #2c3e50; padding: 0; }
.tab { color: #ecf0f1; text-decoration: none; padding: 14px 24px; transition: background 0.2s; }
.tab:hover { background: #34495e; }
.tab.active { background: #3498db; font-weight: bold; }
.tab-logout { margin-left: auto; color: #bdc3c7 !important; }
.tab-logout:hover { background: #c0392b !important; color: #fff !important; }

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

h1 { margin: 20px 0; color: #2c3e50; }
h2 { margin: 16px 0 8px; }

.btn { display: inline-block; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 14px; color: #fff; background: #95a5a6; margin: 2px; }
.btn:hover { opacity: 0.9; }
.btn.active { background: #3498db; }
.btn-primary { background: #3498db; }
.btn-success { background: #27ae60; }
.btn-export { background: #e67e22; }

.status-filter { margin: 16px 0; }
.actions { margin: 16px 0; }

.order-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin: 16px 0; }
.order-table th { background: #2c3e50; color: #fff; padding: 10px 8px; text-align: left; font-size: 13px; white-space: nowrap; }
.order-table td { padding: 8px; border-bottom: 1px solid #eee; font-size: 13px; }
.order-table tr:hover { background: #f0f7ff; }

.editable { cursor: text; border: 1px solid transparent; padding: 4px; border-radius: 3px; }
.editable:focus { border-color: #3498db; outline: none; background: #fff; }

.status-badge { padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; color: #fff; }
.status-new { background: #e74c3c; }
.status-confirmed { background: #f39c12; }
.status-shipped { background: #3498db; }
.status-tracking { background: #9b59b6; }
.status-done { background: #27ae60; }

.upload-section { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin: 16px 0; }
.upload-section input[type="file"] { margin-right: 12px; }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .tabs { flex-wrap: wrap; }
    .tab { padding: 12px 16px; font-size: 14px; flex: 1; text-align: center; }

    .container { padding: 0 12px; margin: 12px auto; }
    h1 { font-size: 20px; margin: 12px 0; }

    .status-filter { display: flex; flex-wrap: wrap; gap: 6px; }
    .status-filter .btn { padding: 6px 10px; font-size: 12px; }

    .actions { display: flex; flex-wrap: wrap; gap: 6px; }
    .actions .btn { padding: 10px 12px; font-size: 13px; flex: 1; text-align: center; min-width: 0; }

    /* Card layout instead of table on mobile */
    .order-table, .order-table thead, .order-table tbody,
    .order-table th, .order-table tr, .order-table td {
        display: block;
    }
    .order-table thead { display: none; }
    .order-table tr {
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        margin-bottom: 12px;
        padding: 12px;
        position: relative;
    }
    .order-table td {
        padding: 4px 0;
        border-bottom: none;
        font-size: 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .order-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #7f8c8d;
        font-size: 12px;
        min-width: 80px;
        flex-shrink: 0;
    }
    .order-table td:first-child {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
    }
    .order-table td:first-child::before { display: none; }

    .editable { border: 1px solid #ddd; padding: 4px 8px; border-radius: 4px; background: #fafafa; }

    /* Export/Upload pages */
    .upload-section { padding: 16px; }
    .file-list td { font-size: 13px; }
}
