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

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%); }
.login-box { background: white; padding: 2.5rem; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); width: 100%; max-width: 380px; text-align: center; }
.login-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.login-box h1 { color: #1565C0; margin-bottom: 0.25rem; }
.login-sub { color: #666; margin-bottom: 1.5rem; font-size: 0.9rem; }
.login-box input { width: 100%; padding: 0.75rem 1rem; margin-bottom: 0.75rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.95rem; }
.login-box input:focus { outline: none; border-color: #1565C0; }
.login-box button { width: 100%; padding: 0.75rem; background: #1565C0; color: white; border: none; border-radius: 8px; font-size: 1rem; cursor: pointer; }
.login-box button:hover { background: #0D47A1; }
.error-msg { color: #d32f2f; font-size: 0.85rem; margin-bottom: 0.5rem; min-height: 1.2rem; }

/* Navbar */
.navbar { background: white; border-bottom: 1px solid #e0e0e0; padding: 0 1.5rem; display: flex; align-items: center; height: 56px; }
.nav-brand { font-weight: 700; font-size: 1.1rem; color: #1565C0; margin-right: 2rem; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a { padding: 0.5rem 1rem; text-decoration: none; color: #555; border-radius: 6px; font-size: 0.9rem; }
.nav-links a:hover { background: #f0f0f0; }
.nav-links a.active { background: #e3f2fd; color: #1565C0; font-weight: 600; }
#logoutBtn { margin-left: auto; color: #d32f2f !important; }

/* Main */
.container { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; }
h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }
h3 { margin: 1.5rem 0 1rem; font-size: 1.1rem; color: #555; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card { background: white; padding: 1.25rem; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card-label { font-size: 0.8rem; color: #888; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.card-value { font-size: 1.5rem; font-weight: 700; color: #1565C0; }

/* Table */
table { width: 100%; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
th { background: #fafafa; font-weight: 600; color: #555; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Search & Header Actions */
.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.header-row h2 { margin-bottom: 0; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; }
#searchInput { padding: 0.6rem 1rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.9rem; width: 250px; }
#searchInput:focus { outline: none; border-color: #1565C0; }

/* Buttons */
.btn { padding: 0.6rem 1.2rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.9rem; cursor: pointer; background: white; color: #333; }
.btn-primary { background: #1565C0; color: white; border-color: #1565C0; }
.btn-primary:hover { background: #0D47A1; }
.btn-danger { background: #d32f2f; color: white; border-color: #d32f2f; }
.btn-danger:hover { background: #b71c1c; }
.btn-sm { padding: 0.35rem 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.8rem; cursor: pointer; background: white; color: #333; }
.btn-sm:hover { background: #f0f0f0; }
.btn-sm.btn-danger { background: #fff; color: #d32f2f; border-color: #ffcdd2; }
.btn-sm.btn-danger:hover { background: #ffebee; }

/* Badge */
.badge { padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-inactive { background: #fbe9e7; color: #c62828; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: white; border-radius: 16px; padding: 2rem; width: 100%; max-width: 500px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { margin: 0; }
.modal-close { font-size: 1.5rem; cursor: pointer; color: #888; }
.modal-close:hover { color: #333; }
.modal-box label { display: block; font-size: 0.8rem; color: #555; margin-bottom: 0.25rem; margin-top: 0.75rem; }
.modal-box input, .modal-box select { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.9rem; }
.modal-box input:focus, .modal-box select:focus { outline: none; border-color: #1565C0; }
.form-row { display: flex; gap: 1rem; }
.form-row > div { flex: 1; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }
