* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #1e293b;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    border-bottom: 3px solid #3b82f6;
}

.navbar-brand {
    color: #e0ecff;
    font-size: 1.3em;
    font-weight: 700;
    text-decoration: none;
    margin-right: 40px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 4px;
    flex: 1;
}

.navbar-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.navbar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.navbar-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Admin-style dropdown in the navbar. Pure CSS, opens on :hover OR :focus-within
   so it works for desktop mouse, keyboard nav, and touch (tapping the parent gives
   it focus). The parent <a> uses href="#" + onclick preventDefault so the address
   bar doesn't change. */
.navbar-dropdown { position: relative; }
.navbar-dropdown .dropdown-toggle::after { content: ""; }
.navbar-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: #1e3a5f;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 4px;
    list-style: none;
    margin: 0;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.navbar-dropdown:hover > .dropdown-menu,
.navbar-dropdown:focus-within > .dropdown-menu {
    display: block;
}
.navbar-dropdown .dropdown-menu li {
    white-space: nowrap;
}
.navbar-dropdown .dropdown-menu a {
    display: block;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #94a3b8;
    font-size: 0.85em;
}

.navbar-right .user-info {
    color: #cbd5e1;
    font-weight: 500;
}

.navbar-right .role-badge {
    background: #3b82f6;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.navbar-right a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9em;
}

.navbar-right a:hover {
    color: #fff;
}

/* Main Content */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 32px;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.6em;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.page-header .subtitle {
    color: #64748b;
    font-size: 0.95em;
}

/* .report-letter moved to Reports.Shared/wwwroot/css/reports.css so both MAPS
   and StaffPortal pick up the badge style from the same source. */

/* Cards */
.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card h2 {
    font-size: 1.2em;
    color: #1e40af;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.card h3 {
    font-size: 1.05em;
    color: #334155;
    margin-bottom: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #334155;
    font-size: 0.9em;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

select.form-control {
    appearance: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #64748b;
    color: #fff;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.85em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f1f5f9;
    color: #1e40af;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9em;
}

tr:hover {
    background: #f8fafc;
}

.table-compact th,
.table-compact td {
    padding: 6px 6px;
    font-size: 0.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}
.table-compact th {
    letter-spacing: 0;
}

/* Column-width utility classes for data tables. Apply to BOTH the <th> and the
   matching <td> so the column doesn't collapse on rows with shorter values. */
.col-shop  { min-width: 96px; white-space: nowrap; }   /* fits "763 / 7124" combo display */
.col-clock { min-width: 78px; white-space: nowrap; }   /* fits 6-digit clock */

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9em;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #854d0e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    flex: 1;
    min-width: 180px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #1e40af;
}

.stat-card .stat-label {
    color: #64748b;
    font-size: 0.85em;
    margin-top: 4px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    background: #f8fafc;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.upload-area:hover {
    border-color: #3b82f6;
}

.upload-area input[type="file"] {
    margin: 12px 0;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 80px auto;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 8px;
    font-size: 1.5em;
}

.login-card .subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 28px;
    font-size: 0.9em;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.8em;
    margin-top: 40px;
}
