:root {
    --primary: #2563eb;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --secondary: #10b981;
    --secondary-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --secondary-light: #ecfdf5;
    
    --accent: #6366f1;
    --accent-light: #eef2ff;
    
    --danger: #ef4444;
    --danger-gradient: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    --danger-light: #fef2f2;
    
    --warning: #f59e0b;
    --warning-light: #fffbe6;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 20px -4px rgba(15, 23, 42, 0.08), 0 3px 8px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 16px 32px -6px rgba(15, 23, 42, 0.12), 0 6px 14px -4px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #0f172a; /* Cool dark background on desktop around frame */
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* App Container (Mobile friendly constraints with sleek desktop wrapper) */
#app-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-main);
    min-height: 100vh;
    box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow-x: hidden;
}

@media (min-width: 640px) {
    #app-container {
        min-height: 94vh;
        margin: 3vh auto;
        border-radius: var(--radius-xl);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Header */
#app-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    backdrop-filter: blur(10px);
}

#header-title {
    font-size: 19px;
    font-weight: 700;
    flex-grow: 1;
    text-align: center;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

#btn-back {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-2px);
}

#btn-back:active {
    transform: scale(0.92);
}

#btn-back.hidden {
    visibility: hidden;
    pointer-events: none;
}

/* Main Area */
#app-main {
    padding: 20px;
}

.screen {
    display: none !important;
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
    display: block !important;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(12px) scale(0.99); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.screen.flex-center.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

.flex-center:not(.screen) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* Typography & Layout Utility */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.pt-20 { padding-top: 20px; }
.pb-40 { padding-bottom: 40px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }
.gap-10 { gap: 10px; }
.relative { position: relative; }

/* Buttons */
.btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-large {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 9px 14px;
    font-size: 13.5px;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-secondary:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background-color: var(--bg-card);
    color: var(--primary);
    border: 1.5px solid var(--primary-border);
    box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.btn-success {
    background: var(--secondary-gradient);
    color: white;
}

/* Home Screen */
.home-hero {
    text-align: center;
    padding: 36px 20px 28px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-icon {
    font-size: 54px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    display: inline-block;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.3));
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.home-hero h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 7px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.home-menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

/* Menu Cards for Home Screen */
.menu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-card.primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.menu-card.secondary {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

.menu-card.outline {
    background: #ffffff;
    border: 1.5px solid var(--primary-border);
    color: var(--text-main);
}

.menu-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.menu-card.outline .menu-card-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.menu-card-text {
    flex-grow: 1;
}

.menu-card-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.menu-card-desc {
    font-size: 12.5px;
    opacity: 0.85;
    margin-top: 3px;
    font-weight: 500;
}

.menu-card.outline .menu-card-desc {
    color: var(--text-muted);
}

.menu-card-arrow {
    font-size: 14px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.menu-card:hover .menu-card-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* History Report Action Buttons */
.btn-whatsapp {
    background: #25D366 !important;
    color: white !important;
    border: none !important;
    width: 100%;
    padding: 14px 18px !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
    justify-content: flex-start !important;
}

.btn-whatsapp:hover {
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45) !important;
}

.btn-preview {
    background: #4f46e5 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3) !important;
}

.btn-print {
    background: #2563eb !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
}

.btn-pdf {
    background: #e11d48 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.3) !important;
}

.btn-excel {
    background: #059669 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.3) !important;
}

.btn-delete-history {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: none !important;
    width: 100%;
    padding: 12px !important;
    font-size: 13.5px !important;
}
.btn-delete-history:hover {
    background: #0f172a !important;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Room List */
.screen-header-text {
    margin-bottom: 18px;
}
.screen-header-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.screen-header-text p {
    font-size: 14px;
    color: var(--text-muted);
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.list-item:hover {
    border-color: var(--primary-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.list-item:hover::before {
    opacity: 1;
}

.list-item:active {
    transform: scale(0.99);
    background: var(--primary-light);
}

.list-item-title {
    font-weight: 600;
    font-size: 15.5px;
    color: var(--text-main);
}

.list-item-status {
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-done { 
    background: #dcfce7; 
    color: #15803d; 
    border: 1px solid #bbf7d0;
}

.status-pending { 
    background: #fef2f2; 
    color: #991b1b; 
    border: 1px solid #fecaca;
}

/* Form Elements */
.form-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.form-header h3 {
    color: var(--primary);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.form-datetime {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
}

.form-datetime i {
    color: var(--primary);
}

.form-section h4 {
    margin-bottom: 16px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

.form-section h4 i {
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

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

.input-group label {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14.5px;
    background: #f8fafc;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.employee-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
    background: #f8fafc;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.employee-row input.emp-name {
    background: #ffffff;
}

.employee-time {
    background: #ffffff;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-main);
    font-weight: 500;
}

/* Counters */
.counter-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.counter-group label {
    font-weight: 600;
    color: var(--text-main);
}

.counter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-counter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 15px;
    font-weight:bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: transform 0.1s ease;
}

.btn-counter:active { 
    transform: scale(0.9); 
}

.counter input {
    width: 36px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-main);
}

.total-badge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-align: right;
    font-size: 15px;
    color: #0369a1;
}

/* Photos */
.photo-area {
    display: flex;
    flex-direction: column;
}

#photo-preview {
    width: 100%;
    border-radius: var(--radius-md);
    max-height: 250px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.btn-remove-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success Screen Styling */
.success-card {
    background: #ffffff;
    padding: 40px 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(16, 185, 129, 0.15);
    border: 1px solid #bbf7d0;
    max-width: 90%;
    width: 100%;
    animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon-badge {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
    animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35); }
    50% { transform: scale(1.05); box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5); }
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: white;
    padding: 16px 10px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.stat-card.success { border-bottom: 4px solid var(--secondary); }
.stat-card.warning { border-bottom: 4px solid var(--warning); }

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

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

/* Detail Card */
.detail-card h3 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section h5 {
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.detail-section p {
    font-weight: 500;
    font-size: 14px;
}

.detail-list {
    list-style: none;
}

.detail-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}

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

.action-group .btn {
    flex: 1;
}

/* Styling for patient row count field */
.pat-count {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
    font-weight: 700 !important;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal Backdrop & Cards */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: #e2e8f0;
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

/* Master Employee Item Row */
.master-emp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.master-emp-item:hover {
    background: #ffffff;
    border-color: var(--primary-border);
}

.btn-edit-master-emp {
    background: #fef3c7;
    color: #d97706;
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-edit-master-emp:hover {
    background: #f59e0b;
    color: white;
}

.btn-del-master-emp {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-del-master-emp:hover {
    background: #ef4444;
    color: white;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90%;
    width: 380px;
}

.toast-item {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s ease;
}

.toast-item.toast-success {
    border-left: 4px solid var(--secondary);
}
.toast-item.toast-success i {
    color: var(--secondary);
}

.toast-item.toast-error {
    border-left: 4px solid var(--danger);
}
.toast-item.toast-error i {
    color: var(--danger);
}

.toast-item.toast-info {
    border-left: 4px solid var(--primary);
}
.toast-item.toast-info i {
    color: var(--primary);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Confirm Icon Badge */
.confirm-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 14px;
}

.confirm-icon-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.confirm-icon-badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

/* Responsive Styles for Smartphone Devices */
@media (max-width: 640px) {
    #app-container {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        padding-bottom: 80px;
    }

    #app-header {
        padding: 14px 16px;
    }

    #header-title {
        font-size: 17.5px;
    }

    #app-main {
        padding: 16px;
    }

    /* Fixed Sticky Bottom Bar for Action Buttons on Smartphone */
    .form-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 16px;
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.12);
        z-index: 500;
    }

    .form-actions .btn {
        margin: 0;
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    }

    #monitoring-form {
        padding-bottom: 60px;
    }

    /* Mobile Bottom Sheet Modal layout */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-card {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        max-width: 100%;
        animation: slideUpBottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideUpBottom {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .toast-container {
        top: 10px;
        width: 92%;
    }
}

/* History Data Table Styles */
.table-history-container {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.table-history {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
    font-size: 13.5px;
}

.table-history th {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px;
}

.table-history td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-history tr:last-child td {
    border-bottom: none;
}

.table-history tr:hover td {
    background: #f8fafc;
}
