:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-dark: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: var(--text-dark);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-field {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

#search-input {
    width: 200px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    white-space: nowrap;
}


.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--light-bg);
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

tbody tr:hover {
    background-color: #f1f8ff;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-completed { background: #d4edda; color: #155724; }
.status-in-progress { background: #cce5ff; color: #004085; }

.status-select {
    border: 1px solid var(--border-color);
    background-color: white;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

#status-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.info { background: #e2e3e5; color: #383d41; }
.error { background: #f8d7da; color: #721c24; }

/* Skeleton Loader */
.skeleton {
    background: #e1e1e1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Table (Cards on Mobile) */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    #search-input {
        width: 100%;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: white;
        padding: 10px;
    }

    td {
        border: none;
        padding: 8px 10px;
        position: relative;
        padding-left: 40%;
        text-align: right;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 35%;
        font-weight: bold;
        text-align: left;
        color: var(--secondary-color);
        font-size: 0.8rem;
        text-transform: uppercase;
    }
}

#login-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.login-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    width: 300px;
}
.login-box input {
    padding: 10px;
    margin: 15px 0;
    width: calc(100% - 20px);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
