:root {
    /* Colors */
    --primary-color: #0b3268;
    --primary-hover: #1a4a8e;
    --bg-color: #f4f7f6;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --error-color: #e53e3e;
    --success-color: #38a169;

    /* Spacing & Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
}

/* Layout Container */
.admin-container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
}

/* Page Card */
.page-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    overflow-x: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: var(--text-light);
    color: var(--primary-color);
}

.btn-header {
    color: var(--text-main);
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
}

.btn-header:hover {
    color: var(--primary-color);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--text-main);
    table-layout: auto;
}

.data-table th {
    background: #f8fafc;
    padding: 14px 12px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.025em;
}

.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* Zebra Striping */
.data-table tbody tr:nth-child(even) {
    background-color: #fcfdfe;
}

.data-table tr:hover {
    background: #f1f5f9 !important;
    cursor: pointer;
}

/* Alignment Helpers */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 20px;
    color: var(--text-main);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--primary-color);
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.input-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.form-input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 50, 104, 0.1);
}

/* Premium Layout Components */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f7fafc;
}

.section-title i {
    color: var(--primary-color);
}

/* Grids */
.form-grid-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}

.form-columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-columns-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Profile Elements */
.profile-placeholder {
    width: 160px;
    height: 160px;
    background: #f7fafc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 70px;
    color: var(--text-light);
    border: 2px dashed var(--border-color);
    transition: all 0.2s;
}

.profile-placeholder:hover {
    background: #ebf4ff;
    border-color: #3182ce;
    color: #3182ce;
    cursor: pointer;
}

/* Footer / Action Rows */
.action-row {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-submit-premium {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(11, 50, 104, 0.2);
}

.btn-submit-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(11, 50, 104, 0.3);
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-present {
    color: #38a169;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
}

.status-late {
    color: #d69e2e;
    background: #fffaf0;
    border: 1px solid #feebc8;
}

.status-absent {
    color: #e53e3e;
    background: #fff5f5;
    border: 1px solid #fed7d7;
}

/* Summary Cards (Dashboard styles) */
.summary-card-group {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.summary-item {
    flex: 1;
    padding: 20px;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.summary-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
}

.page-link {
    padding: 6px 14px;
    border: 1px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.page-link:hover {
    background: #edf2f7;
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .form-grid-layout {
        grid-template-columns: 1fr;
    }

    .form-columns-3 {
        grid-template-columns: 1fr;
    }
}

/* Dashboard App Grid (web2 synchronization) */
.app_home {
    background-color: #f2f2f2;
    min-height: calc(100vh - 60px);
}

.wrap_apps {
    padding: 30px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.app_home_greeting {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    line-height: 1.3;
}

.app_row {
    display: flex;
    width: 100%;
}

.app_list {
    display: inline-block;
    width: 33.333%;
    text-align: center;
    margin-bottom: 30px;
    vertical-align: top;
}

.app {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.app_ico {
    width: 68px;
    height: 68px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app:hover .app_ico {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: var(--primary-color);
    color: #fff;
}

.app_txt {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.app_sub {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 0 5px;
}

.app_sub a {
    font-size: 11px;
    color: #718096;
    text-decoration: none;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.app_sub a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Notification Dot */
.dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background: var(--error-color);
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 10;
}

.app_sep {
    display: block;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
}

.app_title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 30px 0 20px 0;
    padding-left: 15px;
    width: 100%;
    text-align: left;
    border-left: 4px solid var(--primary-color);
}

/* Mobile Adjustments for App Grid */
@media (max-width: 480px) {
    .app_ico {
        width: 58px;
        height: 58px;
        font-size: 22px;
    }

    .app_txt {
        font-size: 13px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .form-grid-layout {
        grid-template-columns: 1fr;
    }

    .form-columns-3 {
        grid-template-columns: 1fr;
    }
}