* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    width: 350px;
}

.login-box h1 { color: #1565c0; text-align: center; margin-bottom: 10px; }
.login-box h2 { text-align: center; margin-bottom: 25px; color: #666; font-size: 18px; font-weight: 400; }

.login-box label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
.login-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.login-box button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}
.login-box button:hover { background: #1565c0; }

.alert {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert.error { background: #ffebee; color: #c62828; }

.topbar {
    background: #1565c0;
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.topbar h1 { font-size: 20px; }
.topbar div { display: flex; gap: 15px; align-items: center; }
.btn-logout {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.35); }

.container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.card h2 { margin-bottom: 20px; color: #1565c0; font-size: 18px; }

form input, form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 10px;
    font-family: inherit;
}
form input[type=text], form textarea { width: 300px; }
form textarea { width: 100%; min-height: 60px; margin-top: 8px; }

form button {
    padding: 10px 20px;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
form button:hover { background: #1565c0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}
th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}
th { background: #f5f7fa; color: #555; font-weight: 600; }
tr:hover { background: #f9fbfd; }

.badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin-right: 4px;
    display: inline-block;
}
.btn-download { background: #43a047; color: #fff; }
.btn-download:hover { background: #2e7d32; }
.btn-edit { background: #fb8c00; color: #fff; }
.btn-edit:hover { background: #ef6c00; }
.btn-delete { background: #e53935; color: #fff; }
.btn-delete:hover { background: #c62828; }

#uploadMsg { margin-top: 10px; font-size: 14px; }
#uploadMsg.success { color: #2e7d32; }
#uploadMsg.error { color: #c62828; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.active { display: flex; }
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 450px;
    max-width: 90%;
}
.modal-content h3 { margin-bottom: 20px; color: #1565c0; }
.modal-content label { display: block; margin: 12px 0 5px; font-weight: 600; font-size: 14px; }
.modal-content input, .modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-right: 0;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.btn-cancel {
    background: #9e9e9e !important;
}
.btn-cancel:hover { background: #757575 !important; }


.btn-download {
    background: #43a047;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.btn-download:hover {
    background: #2e7d32;
}