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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding-bottom: 2rem;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.login-card h1 {
    font-size: 1.6rem;
    color: #1a73e8;
    margin-bottom: 0.3rem;
}

.login-card .subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-card input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border 0.2s;
}

.login-card input:focus {
    border-color: #1a73e8;
}

.login-card button, .btn {
    width: 100%;
    padding: 0.8rem;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-card button:hover, .btn:hover {
    background: #1557b0;
}

.top-nav {
    background: #1a73e8;
    color: white;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-nav .logo {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    display: none;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.15);
}

.nav-links .logout {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
}

.container {
    max-width: 800px;
    margin: 1rem auto;
    padding: 0 1rem;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #222;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.card .meta {
    font-size: 0.85rem;
    color: #666;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.stat .num {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a73e8;
}

.stat .label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.2rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

th {
    font-weight: 600;
    color: #555;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.actions a, .actions button {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #1a73e8;
    color: white;
}

.btn-warning {
    background: #f9a825;
    color: white;
}

.btn-danger {
    background: #e53935;
    color: white;
}

.btn-success {
    background: #43a047;
    color: white;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: #fff3e0;
    color: #e65100;
}

.badge-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-overdue {
    background: #fce4ec;
    color: #c62828;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #444;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #1a73e8;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.alert {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert.error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.empty {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.empty a {
    color: #1a73e8;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-header h2 {
    margin-bottom: 0;
}

.page-header .btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 0.5rem;
    }

    .nav-links.show {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table-wrap table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.4rem 0.3rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
