:root {
    --bg: #f4f7fb;
    --card: #fbfdff;
    --text: #2a3650;
    --muted: #7b88a3;
    --border: #dce4ed;
    --accent: #7c99c9;
    --accent-soft: #e5eff9;
    --success: #2d8f69;
    --danger-soft: #fde7e7;
}

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    background: linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.65)), 
                url('https://lh3.googleusercontent.com/p/AF1QipM89GBRhHhYg1eoDHd0fvshKvVu0SCgCvOVWGZc=s1360-w1360-h1020-rw?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text);
}

.container {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

h1, h2 {
    margin: 0 0 16px;
}

.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

input, select, button {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
}

input {
    background: #f2f6fb;
    color: var(--text);
}

select {
    background: #f7fafd;
}

input:focus,
select:focus,
button:focus {
    outline: none;
    border-color: rgba(124, 153, 201, 0.55);
    box-shadow: 0 0 0 4px rgba(124, 153, 201, 0.16);
}

button {
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(124, 153, 201, 0.18);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    background: #6882b5;
    transform: translateY(-1px);
}

button.secondary, a.secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border: 1px solid var(--border);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 14px;
    min-width: 84px;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
}

.table-actions button,
.table-actions a.secondary {
    width: auto;
    padding: 8px 14px;
    font-size: 0.9rem;
    line-height: 1.2;
    border-radius: 999px;
    box-shadow: none;
}

button.danger, .danger {
    background: #f87171;
    color: white;
    border-color: #ef4444;
}

button.danger:hover, .danger:hover {
    background: #ef4444;
}

.table-actions a.secondary, .table-actions form {
    margin: 0;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 40px;
    background: transparent;
}

.login-card {
    max-width: 460px;
    width: 100%;
    padding: 36px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(163, 179, 204, 0.28);
    backdrop-filter: blur(10px);
    box-shadow: 0 26px 60px rgba(92, 114, 153, 0.08);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: rgba(124, 153, 201, 0.14);
    border-radius: 50%;
}

.login-brand {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 26px;
    position: relative;
    z-index: 1;
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #7c99c9 0%, #c3d4ee 100%);
    box-shadow: 0 20px 40px rgba(124, 153, 201, 0.18);
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-footer a.secondary {
    justify-content: center;
}

.alert-danger {
    background: #fde8e8;
    color: #9b2c2c;
    border-color: #f7c8c8;
}

.logo-preview {
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: center;
    background: #ffffff;
}

.logo-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

th, td {
    text-align: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}

.master-data-grid {
    display: grid;
    grid-template-columns: minmax(320px, 380px) 1fr;
    gap: 24px;
    align-items: start;
}

.master-data-panel {
    padding: 24px;
}

..master-data-form {
    display: grid;
    gap: 14px;
    max-width: 360px;
    margin: 0 auto;
}

.master-data-form label {
    margin-top: 0;
}

.master-data-form input,
.master-data-form button {
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
}

.master-data-form input {
    min-width: 0;
}

.master-data-form button {
    margin-top: 8px;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions form,
.table-actions a.secondary {
    margin: 0;
}

th {
    font-weight: 700;
    color: var(--muted);
}

.status-present {
    color: var(--success);
    font-weight: 700;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #dbeafe;
    color: #1e40af;
}

.report-filter-form {
    display: grid;
    gap: 18px;
}

.report-filter-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}

.report-filter-grid .filter-field {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-filter-grid label {
    margin: 0;
}

.report-filter-grid input,
.report-filter-grid select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
}

.report-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.report-table-wrapper {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.report-table-wrapper table {
    margin-top: 0;
}

.report-table-wrapper thead th {
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 1;
}

@media (max-width: 640px) {
    .card {
        padding: 18px;
    }
}
