/* Admin Dashboard Modern Styles */
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e3e6f0;
    --text-main: #2c3e50;
    --text-muted: #858796;
    --shadow-sm: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2);
    --shadow-md: 0 4px 6px rgba(58, 59, 69, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-family);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Card & Containers */
.attendance-container,
.filter-bar,
.card {
    background: var(--card-bg) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Filter Bar Specifics */
.filter-bar {
    padding: 1.5rem !important;
    align-items: flex-end;
    /* Align inputs and buttons at bottom */
    gap: 15px;
}

.filter-bar label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Inputs & Selects */
.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 1rem + 2px);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: var(--radius-md);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus {
    color: var(--text-main);
    background-color: #fff;
    border-color: #bac8f3;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: var(--radius-md);
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%) !important;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #224abe 0%, #4e73df 100%) !important;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%) !important;
    color: #fff;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #dda20a 0%, #f6c23e 100%) !important;
    box-shadow: 0 4px 10px rgba(246, 194, 62, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #858796 0%, #60616f 100%) !important;
    color: #fff;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #60616f 0%, #858796 100%) !important;
}

/* Table Styling */
table.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-main);
}

table.table thead th {
    background-color: #eaecf4;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-top: none;
    border-bottom: 2px solid var(--primary-color);
    white-space: nowrap;
}

table.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

table.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

table.table tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Status Colors & Logic */
.table-success {
    background-color: rgba(28, 200, 138, 0.1) !important;
}

.table-warning {
    background-color: rgba(246, 194, 62, 0.1) !important;
}

td strong {
    color: #2c3e50;
    font-weight: 700;
}

/* Custom Spacing overrides for inline styles */
.filter-bar>div {
    margin-bottom: 0 !important;
}

/* Print Styles */
@media print {
    body {
        background: #fff;
    }

    .attendance-container,
    .filter-bar {
        box-shadow: none !important;
        border: none !important;
    }
}