/* Reset & Base Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131a2c;
    --bg-card: rgba(22, 30, 49, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --purple-glow: #a855f7;
    --blue-glow: #3b82f6;
    --green-glow: #10b981;
    --accent: #ec4899;
    --card-blur: blur(16px);
    --font-primary: 'Outfit', sans-serif;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    overflow: hidden;
    height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* App Layout */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--purple-glow), var(--blue-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
}

.brand h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.brand span {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    background: rgba(236, 72, 153, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    border-left: 3px solid var(--blue-glow);
    padding-left: 13px;
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.1);
}

#nav-global-refresh-sidebar,
#nav-theme-toggle {
    opacity: 0.75;
    font-size: 13px;
    padding: 8px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4px;
}

#nav-global-refresh-sidebar:hover,
#nav-theme-toggle:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 70% 10%, rgba(99, 102, 241, 0.08), transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(236, 72, 153, 0.05), transparent 40%);
    padding: 30px;
    overflow-y: auto;
}

/* Header Area */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.top-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.current-date-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.current-date-info span {
    font-weight: 600;
    color: var(--blue-glow);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-glow), var(--purple-glow));
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #ef4444;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    color: #fff;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

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

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn.disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.btn-clear:hover {
    color: #ff4d4d;
}

/* Tabs Panes */
.tab-pane {
    display: none;
    flex-direction: column;
    gap: 30px;
    height: 100%;
}

.tab-pane.active {
    display: flex;
}

/* Cards & Layouts */
.content-card {
    background: var(--bg-card);
    backdrop-filter: var(--card-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
    flex-shrink: 0;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.max-w-600 {
    max-width: 600px;
}

.w-100 {
    width: 100%;
}

.badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-glow);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    flex-shrink: 0;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--card-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.purple-glow {
    background: rgba(168, 85, 247, 0.1);
    color: var(--purple-glow);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.stat-icon.blue-glow {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-glow);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.stat-icon.green-glow {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-glow);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

/* Dashboard Split */
.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    flex-grow: 1;
    min-height: 350px;
}

/* Terminal Card */
.terminal-card {
    display: flex;
    flex-direction: column;
}

.terminal-body {
    background-color: #060913;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.terminal-body p {
    line-height: 1.5;
}

.system-line {
    color: var(--text-secondary);
}

.info-line {
    color: var(--blue-glow);
}

.success-line {
    color: var(--green-glow);
}

.error-line {
    color: #ef4444;
}

/* Date / Calendar Card */
.date-card {
    height: fit-content;
}

.form-group-inline {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--blue-glow);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Password eye wrapper */
.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
}

.toggle-password:hover {
    color: #fff;
}

/* Tables */
.table-container {
    overflow-x: auto;
    max-height: 550px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.text-center {
    text-align: center;
}

/* Parameters Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-height: 550px;
    overflow-y: auto;
    padding-right: 10px;
}

.param-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.param-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.param-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.param-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.param-input-group label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Slips Split View */
.slips-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.slips-list-card {
    max-height: 600px;
}

.pdf-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 8px;
    flex-grow: 1;
}

div.pdf-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

div.pdf-item:hover, div.pdf-item.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--blue-glow);
}

tr.pdf-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

tr.pdf-item:hover {
    background: rgba(59, 130, 246, 0.08);
}

tr.pdf-item.active {
    background: rgba(59, 130, 246, 0.12);
}

tr.pdf-item td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme tr.pdf-item td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.pdf-viewer-actions-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    justify-content: flex-end;
    gap: 12px;
}

body.light-theme .pdf-viewer-actions-footer {
    background: rgba(15, 23, 42, 0.02);
}

.pdf-icon-wrapper {
    width: 38px;
    height: 38px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.pdf-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    min-width: 0;
}

.pdf-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}

.pdf-size {
    font-size: 11px;
    color: var(--text-secondary);
}

.pdf-arrow {
    color: var(--text-secondary);
    font-size: 14px;
}

.no-pdfs-msg, .select-pdf-msg {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin: auto;
}

.slips-viewer-card {
    height: 600px;
}

.pdf-viewer-body {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111520;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: #fff;
    padding: 16px 24px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
    transform: translateY(0);
}

.toast-notification.error {
    background: #ef4444;
}

.toast-notification.info {
    background: var(--blue-glow);
}

/* Params Clean Layout */
.params-clean-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    padding-top: 10px;
}

.params-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.params-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--blue-glow);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.components-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.table-input {
    padding: 6px 10px;
    font-size: 13px;
    height: 34px;
}

.params-table td {
    padding: 8px 12px;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 150%);
    background: rgba(19, 26, 44, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--blue-glow);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    z-index: 900;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bulk-actions-bar.show {
    transform: translate(-50%, 0);
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}

.bulk-selected-icon {
    color: var(--blue-glow);
    font-size: 18px;
}

.bulk-buttons {
    display: flex;
    gap: 12px;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 19, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close:hover {
    color: #fff;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

/* Actions Column styles in Employee Table */
.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-edit {
    color: var(--blue-glow);
    background: rgba(59, 130, 246, 0.1);
}

.btn-icon-edit:hover {
    color: #fff;
    background: var(--blue-glow);
}

.btn-icon-delete {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.btn-icon-delete:hover {
    color: #fff;
    background: #ef4444;
}

/* Checkbox alignment & style */
.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--blue-glow);
    cursor: pointer;
}

/* Security role restricted elements */
.role-hidden {
    display: none !important;
}

/* Modal setup instructions style */
.setup-instructions {
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.setup-instructions strong {
    color: #fff;
}

/* Sidebar Logout Button */
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    width: fit-content;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #ff6b6b;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Audit Log Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Light Theme Variables & Overrides */
body.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --purple-glow: #7c3aed;
    --blue-glow: #1d4ed8;
    --green-glow: #047857;
    --accent: #be185d;
}

body.light-theme .brand h2 {
    color: #0f172a;
}

body.light-theme .brand span {
    background: rgba(190, 24, 93, 0.1);
}

body.light-theme .nav-item:hover, 
body.light-theme .nav-item.active {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .nav-item.active {
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.1), rgba(124, 58, 237, 0.1));
}

body.light-theme .form-control {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.02);
}

body.light-theme .form-control:focus {
    background: #ffffff;
}

body.light-theme .modal-header h3 {
    color: #0f172a;
}

body.light-theme .terminal-body {
    background-color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .system-line {
    color: #64748b;
}

body.light-theme .modal-overlay {
    background: rgba(15, 23, 42, 0.4);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.3);
}

/* Sidebar Footer Footer Actions */
.sidebar-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(20deg);
}

body.light-theme .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

body.light-theme .theme-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.1);
}

body.light-theme div.pdf-item {
    background: rgba(15, 23, 42, 0.02);
    border-color: var(--border-color);
}

body.light-theme div.pdf-item:hover, body.light-theme div.pdf-item.active {
    background: rgba(29, 78, 216, 0.06);
    border-color: var(--blue-glow);
}

body.light-theme tr.pdf-item:hover {
    background: rgba(29, 78, 216, 0.06);
}

body.light-theme tr.pdf-item.active {
    background: rgba(29, 78, 216, 0.10);
}

/* Row-level direct PDF Download button in actions cell */
.btn-icon-pdf {
    color: var(--green-glow);
    background: rgba(16, 185, 129, 0.1);
}

.btn-icon-pdf:hover {
    color: #fff;
    background: var(--green-glow);
}

/* Modal Form Layout and Section Panels */
.modal-form-sections {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.modal-form-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.modal-form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-form-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-glow);
    margin-bottom: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.doc-status-badge {
    border-radius: 4px;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.15);
    font-weight: 500;
    width: fit-content;
}

.doc-status-badge a {
    color: var(--green-glow);
    text-decoration: underline;
    font-weight: 600;
}

/* Redesigned Modal Form Layout */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-grid-2col {
        grid-template-columns: 1fr;
    }
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-heading-plain {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Upload Cards Side-by-side Grid */
.upload-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .upload-cards-grid {
        grid-template-columns: 1fr;
    }
}

.upload-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1.5px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.upload-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
}

body.light-theme .upload-card {
    background: rgba(15, 23, 42, 0.01);
}

body.light-theme .upload-card:hover {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.15);
}

.upload-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.upload-icon {
    font-size: 20px;
}

.slip-icon-color, .slip-text-color {
    color: var(--green-glow);
}

.form16-icon-color, .form16-text-color {
    color: #f59e0b;
}

.upload-title-text {
    font-size: 15px;
    font-weight: 600;
}

.card-input-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    display: block;
}

.period-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.card-period-input {
    padding-right: 36px;
}

.period-calendar-icon {
    position: absolute;
    right: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.file-picker-wrapper {
    margin-top: 10px;
}

.card-file-input {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Collapsible Payroll Details Section */
.collapsible-section {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.light-theme .collapsible-header {
    background: rgba(15, 23, 42, 0.02);
}

body.light-theme .collapsible-header:hover {
    background: rgba(15, 23, 42, 0.04);
}

.collapsible-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-glow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-icon {
    color: var(--text-secondary);
    font-size: 14px;
    transition: transform 0.2s ease;
}

.collapsible-content {
    display: none;
    padding: 4px 4px 16px 4px;
}

.collapsible-content.active {
    display: block;
}

/* Payslips List Actions and layout updates */
.pdf-item-left {
    flex-shrink: 0;
}

.pdf-item-actions {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.pdf-item-actions .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-preview {
    color: var(--blue-glow);
    background: rgba(59, 130, 246, 0.1);
}

.btn-icon-preview:hover {
    color: #fff;
    background: var(--blue-glow);
}

.btn-icon-email {
    color: var(--purple-glow);
    background: rgba(168, 85, 247, 0.1);
}

.btn-icon-email:hover {
    color: #fff;
    background: var(--purple-glow);
}

/* Bulk Operations Toolbar styles */
.bulk-operations-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

body.light-theme .bulk-operations-toolbar {
    background: rgba(15, 23, 42, 0.01);
}

.bulk-status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.bulk-status-info i {
    color: var(--blue-glow);
    font-size: 16px;
}

.bulk-action-buttons {
    display: flex;
    gap: 10px;
}

/* Column Visibility Dropdown */
.dropdown-column-visibility {
    position: relative;
    display: inline-block;
}
.dropdown-menu-columns {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: var(--bg-card, #1e1e2d);
    border: 1px solid var(--border-color, #2f2f3d);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 12px;
    z-index: 1100;
    min-width: 240px;
    max-height: 400px;
    overflow-y: auto;
}
.dropdown-menu-columns.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}
.column-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: var(--text-primary, #ffffff);
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.column-toggle-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.column-toggle-item input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--color-primary, #7266fc);
}

/* ==========================================================================
   CORPORATE NAVY THEME OVERRIDES (Rameez Scripts Payslip System Style)
   ========================================================================== */

/* Utility Small Form Control */
.form-control-sm {
    width: auto !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    height: 32px !important;
}

/* Global Placeholder Contrast Improvements */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}
body.light-theme .form-control::placeholder {
    color: rgba(15, 23, 42, 0.45) !important;
}

/* Sidebar Styling Overrides (Always Dark Corporate Navy) */
.sidebar {
    background-color: #0b1a30 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.sidebar .brand h2 {
    color: #ffffff !important;
}
.sidebar .nav-item {
    color: #a3b1cc !important;
}
.sidebar .nav-item:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}
.sidebar .nav-item.active {
    background: #007bff !important;
    color: #ffffff !important;
    border-left: none !important;
    padding-left: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25) !important;
}
.sidebar-footer .sidebar-user-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.sidebar-footer #sidebar-username {
    color: #ffffff !important;
}
.sidebar-footer #sidebar-role-pill {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #a3b1cc !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Light Theme Variables Optimization */
body.light-theme {
    --bg-primary: #f4f6f9 !important;
    --bg-secondary: #ffffff !important;
    --bg-card: #ffffff !important;
    --border-color: #e2e8f0 !important;
    --text-primary: #212529 !important;
    --text-secondary: #495057 !important;
}

/* Light Theme Form Control Styling */
body.light-theme .form-control,
body.light-theme select {
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #cbd5e1 !important;
}
body.light-theme .form-control:focus,
body.light-theme select:focus {
    background-color: #ffffff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15) !important;
}

/* Table Header Navy Overrides */
.content-card table thead th,
.data-table thead th {
    background-color: #002855 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    padding: 12px 16px !important;
    border: none !important;
    text-transform: uppercase !important;
    vertical-align: middle !important;
}

/* Light Theme Table Rows Contrast */
body.light-theme tbody tr {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-bottom: 1px solid #e9ecef !important;
}
body.light-theme tbody tr:hover {
    background-color: #f8fafc !important;
}
body.light-theme .data-table td {
    border-bottom: 1px solid #e9ecef !important;
}

/* Stats Icon Box Customization */
.stat-icon-box {
    width: 48px;
    height: 48px;
    background-color: #002855 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 40, 85, 0.15) !important;
}

/* Corporate Modal Design */
.modal-card {
    border-radius: 12px !important;
    overflow-y: auto !important;
    border: none !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25) !important;
}

.modal-header {
    background-color: #002855 !important;
    color: #ffffff !important;
    border-bottom: none !important;
    padding: 16px 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.modal-header h3,
.modal-header h4 {
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

.modal-header .btn-close,
.modal-header #btn-close-modal,
.modal-header #import-close-btn,
.modal-header .close-btn {
    background: none !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 20px !important;
    cursor: pointer !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s !important;
}

.modal-header .btn-close:hover,
.modal-header #btn-close-modal:hover {
    opacity: 1 !important;
}

/* Light Theme Card Shadow & Background */
body.light-theme .content-card,
body.light-theme .modal-card {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
    border: 1px solid #e9ecef !important;
}

/* Custom Status Badges styling */
.badge {
    border-radius: 4px !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
}




/* ============================================
   Payslips Top Action Bar
   ============================================ */
.slips-top-action-bar, .employees-top-action-bar, .attendance-top-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-slips-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.btn-slips-delete {
    background: #dc2626;
    color: #fff;
}
.btn-slips-delete:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.4);
}

.btn-slips-email {
    background: #db2777;
    color: #fff;
}
.btn-slips-email:hover {
    background: #be185d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219,39,119,0.4);
}

.btn-slips-import {
    background: #7c3aed;
    color: #fff;
}
.btn-slips-import:hover {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

.btn-slips-export {
    background: #10b981;
    color: #fff;
}
.btn-slips-export:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}

.btn-slips-refresh {
    background: #f59e0b;
    color: #fff;
}
.btn-slips-refresh:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}

.btn-slips-add {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
}
.btn-slips-add:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.btn-slips-pdf {
    background: #2563eb;
    color: #fff;
}
.btn-slips-pdf:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}

/* --- Zoom & Small Viewport Adaptation Rules --- */

/* Vertical Zoom / Height adaptation for Sidebar */
@media (max-height: 800px) {
    .sidebar {
        padding: 16px !important;
    }
    .brand {
        margin-bottom: 20px !important;
    }
    .nav-item {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
    .sidebar-footer {
        padding-top: 12px !important;
    }
    .sidebar-nav {
        gap: 4px !important;
    }
}

@media (max-height: 650px) {
    .sidebar {
        padding: 12px 10px !important;
    }
    .brand {
        margin-bottom: 12px !important;
        gap: 8px !important;
    }
    .brand h2 {
        font-size: 18px !important;
    }
    .brand span {
        font-size: 10px !important;
        padding: 1px 4px !important;
    }
    .nav-item {
        padding: 6px 10px !important;
        font-size: 13px !important;
        gap: 8px !important;
    }
    .nav-item i {
        font-size: 16px !important;
        width: 18px !important;
    }
}

/* Horizontal Zoom / Width adaptation for grids and splits */
@media (max-width: 1024px) {
    .dashboard-split {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh !important;
        width: 100vw !important;
    }
    .sidebar {
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        position: relative !important;
    }
    body {
        overflow: auto !important;
        height: auto !important;
    }
    .main-content {
        padding: 16px !important;
    }
    .top-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
}

/* Sticky table headers and horizontal scrolling wrapping fixes */
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #002855 !important;
}

.data-table th,
.data-table td {
    white-space: nowrap !important;
}

/* Ensure the table container handles horizontal and vertical scroll correctly */
.table-container {
    overflow-x: auto !important;
    overflow-y: auto !important;
    position: relative;
}
