/* RS Staff Hour Calculator Stylesheet (Trilogy Paper Edition) */

:root {
    --rs-primary: #4f46e5;
    --rs-primary-hover: #4338ca;
    --rs-secondary: #0ea5e9;
    --rs-success: #10b981;
    --rs-warning: #f59e0b;
    --rs-danger: #ef4444;
    --rs-text-main: #0f172a;
    --rs-text-muted: #475569;
    --rs-bg-main: #f8fafc;
    --rs-bg-card: #ffffff;
    --rs-border: #cbd5e1;
    --rs-radius: 12px;
    --rs-radius-sm: 6px;
    --rs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --rs-transition: all 0.2s ease-in-out;
}

.rs-calc-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--rs-text-main);
    background-color: var(--rs-bg-main);
    padding: 0;
    border-radius: var(--rs-radius);
    max-width: 1400px;
    margin: 20px auto;
    box-shadow: var(--rs-shadow);
    border: 1px solid var(--rs-border);
    overflow: hidden;
}

.rs-calc-wrapper * {
    box-sizing: border-box;
}

/* Unified Navbar Design */
.rs-navbar {
    background-color: #2b3e50; /* Deep slate teal */
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rs-navbar-brand {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.rs-navbar-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.rs-nav-tab {
    border: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #a7b7c8; /* Light greyish teal */
    border-radius: 6px;
    cursor: pointer;
    transition: var(--rs-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rs-nav-tab:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.rs-nav-tab.active {
    background-color: #c2410c !important; /* Premium Rust Orange */
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Sub-Header Bar (Action/Filters Bar) */
.rs-sub-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--rs-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Selector Filters Bar */
.rs-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 12px 16px;
    border-radius: var(--rs-radius-sm);
    border: 1px solid var(--rs-border);
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

.rs-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Inputs & Buttons */
.rs-select, .rs-input {
    padding: 6px 10px;
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius-sm);
    font-size: 13px;
    background: #fff;
}

.rs-select:focus, .rs-input:focus {
    outline: none;
    border-color: var(--rs-primary);
}

.rs-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--rs-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--rs-transition);
}

.rs-btn-primary { background: var(--rs-primary); color: #fff; }
.rs-btn-primary:hover { background: var(--rs-primary-hover); }

.rs-btn-secondary { background: #fff; border-color: var(--rs-border); color: var(--rs-text-main); }
.rs-btn-secondary:hover { background: #f1f5f9; }

.rs-btn-success { background: var(--rs-success); color: #fff; }
.rs-btn-success:hover { background: var(--rs-success-hover); }

/* Stats Cards */
.rs-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.rs-stat-card {
    border-radius: var(--rs-radius-sm);
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    flex: 0 1 auto;
    min-width: 260px;
}

.rs-stat-card.stat-info {
    background: #eff6ff !important;
    border: 1px solid #dbeafe !important;
}
.rs-stat-card.stat-info .rs-stat-label {
    color: #1e40af !important;
}
.rs-stat-card.stat-info .rs-stat-val {
    color: #1d4ed8 !important;
}
.rs-stat-card.stat-info .rs-stat-subtext {
    color: #3b82f6 !important;
}

.rs-stat-card.stat-warning {
    background: #fff7ed !important;
    border: 1px solid #ffedd5 !important;
}
.rs-stat-card.stat-warning .rs-stat-label {
    color: #7c2d12 !important;
}
.rs-stat-card.stat-warning .rs-stat-val {
    color: #c2410c !important;
}
.rs-stat-card.stat-warning .rs-stat-subtext {
    color: #ea580c !important;
}

.rs-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--rs-text-muted);
    margin-bottom: 4px;
}

.rs-stat-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--rs-text-main);
}

.rs-stat-subtext {
    font-size: 11px;
    color: var(--rs-text-muted);
    margin-top: 2px;
}

/* 1. WEEKLY STAFF SCHEDULING GRID (PAPER REPLICA) */
.rs-weekly-card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
    overflow-x: auto;
}

/* HORIZONTAL 5-DAY CARD SCHEDULER */
.rs-day-cards-container {
    display: flex;
    gap: 28px;
    justify-content: flex-start;
    align-items: stretch;
    margin-bottom: 30px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.rs-day-card {
    flex: 0 0 320px;
    min-width: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 500px;
}



.rs-day-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.rs-day-name {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #c2410c;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
    margin-bottom: 2px;
}

.rs-day-num {
    display: block;
    font-size: 26px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.rs-day-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #c2410c !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
}

.rs-day-icon-btn:hover {
    background: #c2410c !important;
    color: #ffffff !important;
    border-color: #c2410c !important;
}

.rs-day-icon-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.rs-current-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef2f2;
    color: #ef4444;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 9999px;
    border: 1px solid #fee2e2;
    letter-spacing: 0.5px;
}

.rs-current-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: rs-blink 1.5s infinite;
}

@keyframes rs-blink {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.rs-shift-block {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rs-shift-block:last-of-type {
    margin-bottom: 0;
}

.rs-shift-block-title {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.rs-shift-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 4px;
}

.rs-sched-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px 12px 6px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.rs-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 32px;
    color: #cbd5e1;
    cursor: grab;
    transition: color 0.2s ease;
    user-select: none;
}

.rs-drag-handle:hover {
    color: #64748b;
}

.rs-drag-handle:active {
    cursor: grabbing;
}

/* Sortable helper styles */
.rs-sortable-placeholder {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 6px;
    height: 58px;
    margin-bottom: 0;
}

.rs-sched-item input[type="text"].rs-weekly-name-input {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
}

.rs-sched-item input[type="text"].rs-weekly-hours-input {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 4px 0 0 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
}

.rs-sched-item input[type="text"].rs-weekly-name-input:focus,
.rs-sched-item input[type="text"].rs-weekly-hours-input:focus {
    outline: none !important;
    background-color: #fef08a !important;
}

.rs-sched-item input[type="text"].rs-weekly-name-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
    opacity: 0.65 !important;
}

.rs-sched-item input[type="text"].rs-weekly-hours-input::placeholder {
    color: #cbd5e1 !important;
    font-weight: 400 !important;
    opacity: 0.65 !important;
}


.rs-add-shift-item-btn {
    width: 100%;
    background: #ffffff !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 12px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #64748b !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}

.rs-add-shift-item-btn:hover {
    border-color: #c2410c !important;
    color: #c2410c !important;
    background-color: #fffafb !important;
}

.rs-weekly-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.rs-weekly-grid th, .rs-weekly-grid td {
    border: 1px solid #e2e8f0;
    padding: 6px;
    text-align: center;
    vertical-align: top;
    font-size: 12px;
}

.rs-weekly-grid th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #334155;
    height: 55px;
    border-bottom: 2px solid #e2e8f0;
    vertical-align: middle;
}

.rs-weekly-grid td:first-child, .rs-weekly-grid th:first-child {
    width: 60px !important;
}

.rs-weekly-grid td:first-child {
    font-weight: 900;
    background-color: #f8fafc;
    vertical-align: middle;
    font-size: 18px !important;
    color: #475569;
    border-right: 2px solid #e2e8f0;
}

.rs-weekly-input-row {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 6px;
    gap: 4px;
}

.rs-card-delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50% !important;
    border: 1px solid #ef4444 !important;
    background: #ffffff !important;
    color: #ef4444 !important;
    font-size: 11px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.15s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    z-index: 10;
    
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.rs-card-delete-btn:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

/* Reveal when hovering or editing the containing card */
.rs-sched-item:hover .rs-card-delete-btn,
.rs-sched-item:focus-within .rs-card-delete-btn {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.rs-weekly-input-row:last-child {
    border-bottom: none;
}

.rs-weekly-grid input[type="text"].rs-weekly-name-input,
.rs-weekly-grid input[type="text"].rs-weekly-hours-input {
    border: 1px solid var(--rs-border) !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    padding: 5px 8px !important;
    margin: 2px 0 !important;
    text-align: left !important;
    width: 100% !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
    transition: all 0.15s ease-in-out !important;
}

.rs-weekly-grid input[type="text"].rs-weekly-name-input:focus,
.rs-weekly-grid input[type="text"].rs-weekly-hours-input:focus {
    border-color: #c2410c !important;
    box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.2) !important;
    outline: none !important;
    background-color: #ffffff !important;
}

.rs-weekly-grid input[type="text"].rs-weekly-hours-input {
    font-size: 11px !important;
    color: var(--rs-text-muted) !important;
    font-weight: 500 !important;
}

.rs-weekly-grid input[type="text"].rs-weekly-name-input {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--rs-text-main) !important;
}

.rs-btn-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50% !important;
    border: 1px solid var(--rs-border) !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    line-height: 20px !important;
}

.rs-btn-row-action:hover {
    border-color: #c2410c !important;
    background-color: #c2410c !important;
    color: #ffffff !important;
}

.rs-pd-input {
    width: 90%;
    text-align: center;
    border: 1px solid #94a3b8;
    background: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px;
    border-radius: 3px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.rs-pd-input:focus {
    outline: none;
    border-color: var(--rs-primary);
}

.rs-weekly-bottom-note {
    width: 100%;
    border: none;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    background: transparent;
    text-transform: uppercase;
}

.rs-weekly-bottom-note:focus {
    outline: none;
    background: #fef08a;
}

/* 2. MONTHLY STAFF ATTENDANCE RATIO GRID (PAPER REPLICA) */
.rs-grid-card {
    background: #fff;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    padding: 32px 36px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.rs-grid-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #cbd5e1;
}

.rs-grid-meta-table td {
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    background-color: #f8fafc;
    color: #334155;
}

.rs-grid-inline-select,
.rs-grid-inline-input {
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    color: #000;
    background-color: #fff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    vertical-align: middle;
}

.rs-grid-inline-select:focus,
.rs-grid-inline-input:focus {
    outline: none;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6;
}

.rs-ratio-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    table-layout: fixed;
    min-width: 1000px;
}

.rs-ratio-grid th, .rs-ratio-grid td {
    border: 1px solid #000 !important;
    text-align: center;
    padding: 4px;
    font-size: 11px;
    color: #000 !important;
}

.rs-ratio-grid th {
    background-color: #e2e8f0 !important;
    font-weight: bold;
    color: #000;
    height: 30px;
}

.rs-ratio-grid td {
    height: 26px;
}

.rs-ratio-grid th:first-child, .rs-ratio-grid td:first-child {
    width: 140px;
    text-align: left;
    padding-left: 10px;
    font-weight: bold;
    background-color: #f1f5f9 !important;
    color: #000;
    border-right: 1px solid #000 !important;
}

.rs-ratio-grid input[type="text"].rs-cell-input {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    text-align: center !important;
    font-size: 11px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background-color: transparent !important;
    box-shadow: none !important;
    cursor: default !important;
}

.rs-cell-input::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none;
}

.rs-cell-input:focus {
    outline: none;
    background-color: #fef08a;
    font-weight: bold;
}

.rs-cell-input::placeholder {
    color: #cbd5e1;
    font-weight: normal;
}

.rs-cell-error {
    background-color: #fee2e2 !important;
    border: 2px solid var(--rs-danger) !important;
    font-weight: bold;
    color: var(--rs-danger) !important;
}

.rs-grid-total-row td {
    background-color: #f1f5f9 !important;
    font-weight: bold !important;
    color: #000 !important;
}

.rs-preset-trigger {
    display: block;
    font-size: 8px;
    color: var(--rs-secondary);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1px;
}

.rs-preset-trigger:hover {
    color: var(--rs-primary);
}

.rs-grid-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.rs-grid-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 12px;
    font-weight: bold;
    flex: 1;
    max-width: 700px;
}

.rs-grid-sig-line {
    border-bottom: 1px solid #000;
    display: inline-block;
    width: 120px;
    height: 18px;
    margin-left: 5px;
}

.rs-grand-total-container {
    text-align: right;
    font-size: 16px;
    font-weight: 800;
    border-bottom: 3px double #000;
    padding-bottom: 2px;
}

/* 3. MULTI-STAFF PAYROLL GRID (PAPER REPLICA) */
.rs-payroll-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
}

.rs-payroll-grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 11px;
    min-width: 800px;
}

.rs-payroll-grid th, .rs-payroll-grid td {
    border: 1px solid #000;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
    color: #000 !important;
}

/* Heavy solid dividers separating different staff members */
.rs-payroll-grid th.staff-divider, .rs-payroll-grid td.staff-divider {
    border-left: 2px solid #000 !important;
}

.rs-payroll-grid th.staff-name-hdr {
    background-color: #f2f2f2 !important;
    font-weight: bold;
    font-size: 12px;
    height: 30px;
    color: #000 !important;
}

.rs-payroll-grid th.staff-sub-hdr {
    background-color: #fafafa !important;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    color: #000 !important;
    height: 24px;
}

.rs-payroll-grid tr.total-payroll-row td {
    font-weight: bold;
    font-size: 11px;
    background-color: #f2f2f2 !important;
    border-bottom: 2px solid #000;
    height: 26px;
    color: #000 !important;
}

/* Common elements */
#rs-global-alert {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 99999;
    max-width: 380px;
    width: auto;
    pointer-events: none;
}

.rs-alert {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: bold;
    border-radius: var(--rs-radius-md);
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: rsSlideIn 0.3s ease forwards;
}

@keyframes rsSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rs-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.rs-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.rs-loader-spinner {
    border: 3px solid rgba(0,0,0,0.1);
    border-top: 3px solid var(--rs-primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rs-app-loading {
    text-align: center;
    padding: 40px;
    color: var(--rs-text-muted);
}

/* Full screen override for WordPress Admin panel */
.toplevel_page_rs-staff-calculator #wpcontent {
    padding: 0 !important;
}

.toplevel_page_rs-staff-calculator #wpbody-content {
    padding: 0 !important;
}

.toplevel_page_rs-staff-calculator .wrap {
    margin: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.toplevel_page_rs-staff-calculator .rs-calc-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    min-height: 100vh;
}

.toplevel_page_rs-staff-calculator .rs-navbar {
    border-radius: 0 !important;
}

.toplevel_page_rs-staff-calculator .rs-content-canvas {
    border-radius: 0 !important;
    min-height: calc(100vh - 110px) !important;
    padding: 32px 40px !important;
}

/* Paper Sheet Realistic Effect */
.rs-paper-sheet-container {
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.06)) drop-shadow(0 2px 6px rgba(15, 23, 42, 0.04));
    margin-bottom: 30px;
    display: block;
    width: 100%;
}

.rs-paper-sheet {
    background: #ffffff !important;
    position: relative;
    border: none !important;
    border-radius: 0 !important;
    /* Rugged edges using polygon clip-path with micro-variations */
    clip-path: polygon(
        0% 0.3%, 12% 0%, 25% 0.2%, 38% 0.1%, 50% 0.3%, 63% 0%, 75% 0.2%, 88% 0.1%, 100% 0.3%,
        99.8% 12%, 100% 25%, 99.7% 38%, 100% 50%, 99.9% 63%, 100% 75%, 99.7% 88%, 100% 99.7%,
        88% 99.9%, 75% 99.6%, 63% 100%, 50% 99.7%, 38% 99.9%, 25% 99.6%, 12% 100%, 0% 99.7%,
        0.2% 88%, 0% 75%, 0.3% 63%, 0.1% 50%, 0.2% 38%, 0% 25%, 0.3% 12%
    );
}

/* PRINT MEDIA SHEETS */
.rs-printable-sheet {
    display: none;
    font-family: Arial, sans-serif;
}

@media print {
    body {
        background: #fff;
        color: #000;
        margin: 0 !important;
        padding: 0 !important;
    }

    @page {
        size: landscape;
        margin: 0.5cm;
    }

    #wpadminbar, #adminmenuwrap, #adminmenuback, #wpfooter, .rs-filters-bar, .rs-tabs-nav, .rs-stats-grid, .rs-btn-row, .rs-grid-actions-bar, .rs-alert, .rs-preset-trigger, .rs-app-loading, .rs-calc-title, .wp-heading-inline, .wp-header-end, .rs-tab-content, .rs-calc-header, .rs-modal-overlay, .rs-navbar, .rs-sub-header, .rs-content-canvas {
        display: none !important;
    }

    #wpcontent, #wpbody, #wpbody-content, .wrap, .rs-calc-container, #rs-calc-app, .rs-calc-wrapper {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .rs-printable-sheet {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }

    /* Print resets for paper sheets */
    .rs-paper-sheet-container {
        filter: none !important;
        margin-bottom: 0 !important;
    }

    .rs-paper-sheet {
        clip-path: none !important;
        transform: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    /* Print styling for 1. Weekly Schedule */
    .weekly-print-title {
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 15px;
        text-transform: uppercase;
    }

    .weekly-print-grid {
        width: 100%;
        border-collapse: collapse;
    }

    .weekly-print-grid th, .weekly-print-grid td {
        border: 1px solid #000;
        padding: 6px;
        text-align: center;
        vertical-align: top;
        font-size: 11px;
    }

    .weekly-print-grid th {
        background-color: #f2f2f2 !important;
        font-weight: bold;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .weekly-print-grid td:first-child {
        width: 60px;
        font-weight: bold;
        vertical-align: middle;
        background-color: #f2f2f2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .weekly-print-line {
        height: 20px;
        border-bottom: 1px dashed #000;
        line-height: 20px;
        font-weight: bold;
    }

    .weekly-print-line:last-child {
        border-bottom: none;
    }

    /* Print styling for 2. Monthly Attendance Record */
    .ratio-header-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 12px;
    }

    .ratio-header-table td {
        border: 1px solid #000;
        padding: 5px 8px;
        font-size: 11px;
        font-weight: bold;
    }

    .ratio-grid-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 12px;
    }

    .ratio-grid-table th {
        border: 1px solid #000;
        background-color: #e2e8f0 !important;
        padding: 2px;
        font-size: 9px;
        text-align: center;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ratio-grid-table td {
        border: 1px solid #000;
        padding: 2px;
        font-size: 9px;
        text-align: center;
        height: 20px;
        vertical-align: middle;
    }

    .ratio-grid-table .sub-row-title {
        font-size: 8px;
        text-align: left;
        padding-left: 4px;
        font-weight: bold;
        background-color: #f1f5f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ratio-grid-table .total-row td {
        font-weight: bold;
        background-color: #f1f5f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ratio-signatures {
        width: 100%;
        margin-top: 25px;
        border-collapse: collapse;
    }

    .ratio-signatures td {
        border: none;
        padding: 6px 0;
        font-size: 11px;
        vertical-align: bottom;
    }

    .signature-line {
        border-bottom: 1px solid #000;
        width: 130px;
        display: inline-block;
        height: 16px;
        margin-left: 5px;
    }

    /* Print styling for 3. Staff Payroll Sheet */
    .payroll-print-title {
        text-align: center;
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 15px;
        text-transform: uppercase;
    }

    .payroll-print-table {
        width: 100%;
        border-collapse: collapse;
    }

    .payroll-print-table th, .payroll-print-table td {
        border: 1px solid #000;
        padding: 2px 3px !important;
        text-align: center;
        font-size: 8.5px;
        white-space: nowrap !important;
        line-height: 1.1 !important;
    }

    .payroll-print-table th.staff-divider, .payroll-print-table td.staff-divider {
        border-left: 2px solid #000 !important;
    }

    .payroll-print-table th.staff-name-hdr {
        background-color: #f2f2f2 !important;
        font-weight: bold;
        font-size: 10px;
        height: 20px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .payroll-print-table th.staff-sub-hdr {
        background-color: #fafafa !important;
        font-weight: bold;
        font-size: 7.5px;
        height: 14px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .payroll-print-table tr.total-payroll-row td {
        font-weight: bold;
        background-color: #f2f2f2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        height: 18px;
    }

    .payroll-print-group {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: always;
        break-after: page;
    }
    
    .payroll-print-group:last-child {
        page-break-after: avoid;
        break-after: avoid;
    }
}

/* Staff List Table Styling */
.rs-staff-list-table th {
    font-size: 13px;
    color: var(--rs-text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--rs-border);
}
.rs-staff-list-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--rs-border);
    vertical-align: middle;
}
.rs-staff-list-table tbody tr:hover {
    background-color: #f8fafc;
}
.rs-staff-list-table select {
    background-color: #fff;
    cursor: pointer;
}

/* Modal Popup Dialog Styles */
.rs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    animation: fadeIn 0.22s ease-out;
}

.rs-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 520px;
    padding: 24px;
    animation: slideUp 0.22s ease-out;
}

.rs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rs-border);
    padding-bottom: 12px;
}

.rs-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--rs-text-main);
}

.rs-modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--rs-text-muted);
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 0.15s ease;
}

.rs-modal-close-btn:hover {
    color: var(--rs-text-main);
}

.rs-form-row {
    display: flex;
    gap: 16px;
}

.rs-modal-content {
    max-width: 500px !important;
    width: 100% !important;
    border-radius: 12px !important;
    padding: 32px 28px !important;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04) !important;
}

.rs-modal-content .rs-form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.rs-modal-content .rs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 0px;
}

.rs-modal-content .rs-input,
.rs-modal-content .rs-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: 40px !important;
    padding: 8px 12px !important;
    border: 1px solid var(--rs-border) !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    font-size: 13.5px !important;
    color: var(--rs-text-main) !important;
    margin-top: 4px !important;
}

.rs-modal-content .rs-label {
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #334155 !important;
    margin: 0 !important;
    display: block !important;
    text-align: left !important;
}

.rs-modal-content p {
    font-size: 11px !important;
    color: var(--rs-text-muted) !important;
    margin: 4px 0 0 0 !important;
    text-align: left !important;
}

.rs-modal-content .rs-btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.rs-staff-card-item {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

.rs-staff-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04) !important;
    border-color: var(--rs-primary) !important;
}

.rs-shift-dot {
    width: 6px;
    height: 6px;
    border-radius: 50% !important;
    display: inline-block;
}
.rs-shift-dot.rs-dot-am {
    background-color: #eab308 !important; /* Yellow */
}
.rs-shift-dot.rs-dot-pm {
    background-color: #475569 !important; /* Dark Slate Gray */
}

/* Hours Input Presets Overlay Buttons */
.rs-hours-presets {
    opacity: 0;
    visibility: hidden;
    transform: translateX(5px);
    transition: all 0.15s ease-in-out;
}

.rs-hours-input-wrapper:focus-within .rs-hours-presets,
.rs-hours-input-wrapper:hover .rs-hours-presets {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.rs-hours-preset-btn {
    border: 1px solid var(--rs-border) !important;
    background-color: #ffffff !important;
    color: #475569 !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    transition: all 0.1s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.rs-hours-preset-btn:hover {
    background-color: var(--rs-primary) !important;
    color: #ffffff !important;
    border-color: var(--rs-primary) !important;
}

/* Floating Tutorial Bot Styles */
#rs-tutorial-bot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    cursor: grab;
    user-select: none;
    font-family: inherit;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease;
}
#rs-tutorial-bot:active {
    cursor: grabbing;
}
#rs-tutorial-bot.dragging {
    transform: scale(0.94);
    transition: none; /* No delay while dragging */
}

/* Bobbing animation for the floating bot when idle */
@keyframes rs-bot-bob {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}
.rs-bot-bobbing {
    animation: rs-bot-bob 3s ease-in-out infinite;
}

#rs-tutorial-bot .bot-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--rs-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    object-fit: cover;
    background: #fff;
    pointer-events: none;
    transition: border-color 0.25s ease;
}
#rs-tutorial-bot:hover .bot-avatar {
    border-color: var(--rs-primary-hover);
}
#rs-tutorial-bot .speech-bubble {
    background: #ffffff;
    border: 1px solid var(--rs-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 16px;
    width: 290px;
    position: relative;
    text-align: left;
}
#rs-tutorial-bot .speech-bubble::after {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 20px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-right: 1px solid var(--rs-border);
    border-bottom: 1px solid var(--rs-border);
    transform: rotate(-45deg);
}
#rs-tutorial-bot .bot-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--rs-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
#rs-tutorial-bot .bot-content {
    font-size: 12.5px;
    color: var(--rs-text-main);
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 500;
}
#rs-tutorial-bot .bot-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}
#rs-tutorial-bot .bot-btn {
    background: var(--rs-primary) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s ease;
}
#rs-tutorial-bot .bot-btn:hover {
    background-color: var(--rs-primary-hover) !important;
    background: var(--rs-primary-hover) !important;
    color: #ffffff !important;
}
#rs-tutorial-bot .bot-btn.btn-outline {
    background: transparent !important;
    color: var(--rs-text-muted) !important;
    border: 1px solid var(--rs-border);
}
#rs-tutorial-bot .bot-btn.btn-outline:hover {
    background: #f8fafc !important;
}

/* Dismiss Area (Red Circle with X and title inside) */
#rs-bot-dismiss-zone {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: rgba(254, 226, 226, 0.95);
    border: 2px solid #ef4444;
    border-radius: 50%;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-weight: 800;
    transition: bottom 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
    pointer-events: none;
    text-align: center;
}
#rs-bot-dismiss-zone.active {
    bottom: 30px;
}
#rs-bot-dismiss-zone.hovered {
    background-color: #ef4444;
    color: #ffffff;
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
    border-color: #dc2626;
}
#rs-bot-dismiss-zone .dismiss-x {
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 2px;
}
#rs-bot-dismiss-zone .dismiss-title {
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
    font-weight: 800;
    padding: 0 6px;
}


