:root {
    /* Color Palette - 2025 Minimalist */
    --bg-body: #f5f5f7;
    --bg-card: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    /* Apple-like Blue */
    --border-color: #d2d2d7;
    --danger-color: #ff3b30;
    --success-color: #34c759;

    /* Spacing & Radius */
    --radius-xl: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --spacing-unit: 8px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #000000;
        --bg-card: #1c1c1e;
        --text-primary: #f5f5f7;
        --text-secondary: #86868b;
        --border-color: #38383a;
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    transition: background-color 0.3s;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hidden {
    display: none !important;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--accent-color);
    color: white;
    font-size: 14px;
}

.btn:active {
    transform: scale(0.96);
}

.btn.secondary {
    background: rgba(118, 118, 128, 0.12);
    color: var(--text-primary);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-field {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 16px;
    transition: border 0.2s;
}

.input-field:focus {
    border-color: var(--accent-color);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.toast {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Compact Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th,
td {
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

td {
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: white;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-success {
    background: var(--success-color);
}

.status-pending {
    background: #ffcc00;
    color: rgba(0, 0, 0, 0.8);
}

.status-closed {
    background: var(--text-secondary);
}

/* Loading Animation */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}