@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-gradient: #f8fafc;
    --glass-bg: #ffffff;
    --glass-border: #e2e8f0;
    --primary-color: #d32f2f;
    --primary-hover: #9a0007;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --input-bg: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
}

body.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism Container (Now Solid White) */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
}

.glass-panel.dashboard-panel {
    max-width: 1000px;
    margin: 40px;
    padding: 30px;
}

h2.title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

p.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.btn-primary {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Dashboard specific */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.header-row h2 {
    font-size: 20px;
    margin: 0;
}

.btn-logout {
    background-color: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table th, table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--glass-border);
}

table th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

table td {
    font-size: 14px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge.on-duty {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge.off-duty {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Sidebar Layout */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    padding: 30px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 30px 20px 30px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 30px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: #f1f5f9;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--glass-bg);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.flex-row {
    display: flex;
    gap: 15px;
}
.flex-row > div {
    flex: 1;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.action-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 10px;
    font-size: 13px;
}
.action-links a:hover {
    text-decoration: underline;
}

