/*styles.css*/

:root {
    --primary: #2E7D32;
    /* Green */
    --danger: #D32F2F;
    /* Red */
    --bg: #F5F5F5;
    --text: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    /* Phone/Tablet width */
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Header */
header {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Forms */
.form-group {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input,
select {
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Big Buttons */
.btn-large {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    color: white;
    background: var(--primary);
    cursor: pointer;
    text-transform: uppercase;
}

.btn-large:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.btn-danger {
    background: var(--danger);
}

.btn-secondary {
    background: #555;
}

/* Status Cards */
.status-card {
    padding: 20px;
    margin: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.status-granted {
    background: var(--primary);
}

.status-denied {
    background: var(--danger);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: #eee;
}

.tab.active {
    background: white;
    border-bottom: 3px solid var(--primary);
    font-weight: bold;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* MODAL STYLES (New) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    height: 80%;
    /* Tall on mobile */
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Search Box inside Modal */
.search-box {
    margin-bottom: 15px;
    padding: 15px;
    font-size: 18px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Scrollable List */
.estate-list {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid #eee;
}

.estate-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.estate-item:active {
    background: #e8f5e9;
}

.close-btn {
    margin-top: 15px;
    background: #555;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* Readonly Input that looks like a dropdown */
.pseudo-select {
    background-color: white;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

/* ===== LOGIN PAGE ENHANCEMENTS ===== */

.login-header {
    justify-content: center;
    gap: 10px;
}

.login-content {
    margin-top: 40px;
    flex: 1;
    overflow-y: auto;
}

.login-title {
    margin: 0 0 30px 0;
    text-align: center;
    color: var(--text);
    font-size: 22px;
}

.login-header i {
    font-size: 24px;
}

.login-header span {
    font-size: 22px;
    font-weight: 700;
}

/* Floating Label Input Wrapper */
.input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 45px 18px 45px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Floating Label */
.floating-label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 5px;
}

/* Label moves up when input is focused or has value */
.input-wrapper input:focus+.floating-label,
.input-wrapper input:not(:placeholder-shown)+.floating-label,
.input-wrapper input:valid+.floating-label,
.input-wrapper input[readonly]:not([value=""])+.floating-label {
    top: -2px;
    left: 40px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

/* Icons inside inputs */
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    pointer-events: none;
    transition: color 0.3s;
}

.input-wrapper input:focus~.input-icon {
    color: var(--primary);
}

/* Dropdown icon for estate select */
.dropdown-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

/* Password toggle icon */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Error message styling */
.error-message {
    color: var(--danger);
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
    min-height: 20px;
}

/* Modal improvements */
.modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text);
}

.loading-text {
    padding: 15px;
    color: grey;
    text-align: center;
}

/* Readonly input cursor */
.pseudo-select {
    cursor: pointer;
}

/* Remove old inline styles that are now in CSS */
.form-group h3 {
    margin: 0 0 30px 0;
}

/* ===== SHIFT OVERLAY ENHANCEMENTS ===== */

.shift-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.95) 0%, rgba(27, 94, 32, 0.95) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.shift-container {
    width: 90%;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shift-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1B5E20 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.shift-header i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.shift-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.shift-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.shift-form {
    padding: 30px 20px;
}

.shift-form .input-wrapper {
    margin-bottom: 25px;
}

.shift-form select {
    width: 100%;
    padding: 18px 45px 18px 45px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
    appearance: none;
    cursor: pointer;
}

.shift-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Floating label for select */
.shift-form select:focus+.floating-label,
.shift-form select:valid+.floating-label {
    top: -2px;
    left: 40px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

/* Button spacing in shift form */
.shift-form .btn-large {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
}

.shift-form .btn-large:last-of-type {
    margin-bottom: 0;
}

.shift-form .btn-large i {
    font-size: 18px;
}

.btn-shift-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1B5E20 100%);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-shift-primary:active {
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.shift-footer {
    background: #f5f5f5;
    padding: 15px 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #e0e0e0;
}

.shift-footer i {
    color: var(--primary);
    font-size: 14px;
}

/* Select dropdown arrow positioning */
.shift-form .dropdown-icon {
    pointer-events: none;
}

/* Disabled state for Clock In button */
.btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* SOS Button Styles */
.btn-sos {
    background-color: #D32F2F;
    color: white;
    border: 2px solid white;
    font-weight: bold;
    font-size: 16px;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    -webkit-user-select: none;
    user-select: none;
    /* Prevent text selection during hold */
    position: relative;
    overflow: hidden;
}

/* Press Animation */
.btn-sos:active {
    transform: scale(0.95);
}

/* The "Filling" effect for long press */
.btn-sos::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background-color: rgba(255, 255, 255, 0.3);
    transition: width 0s;
}

.btn-sos.holding::after {
    width: 100%;
    transition: width 2s linear;
    /* 2 Second Hold Time */
}

.sos-modal {
    background: #FFEBEE;
    border: 2px solid #D32F2F;
}

/* ===== ENHANCED WIZARD STYLES ===== */
.step-section {
    display: none;
    animation: fadeIn 0.3s;
    padding: 20px;
}

.step-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Triage Buttons */
.triage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.triage-btn {
    height: 120px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.triage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.triage-btn:active {
    transform: scale(0.98);
}

.triage-btn i {
    font-size: 40px;
}

.triage-btn.resident {
    border-color: #2E7D32;
}

.triage-btn.resident:hover {
    background: #E8F5E9;
    border-color: #1B5E20;
}

.triage-btn.resident i {
    color: #2E7D32;
}

.triage-btn.visitor {
    border-color: #1976D2;
}

.triage-btn.visitor:hover {
    background: #E3F2FD;
    border-color: #0D47A1;
}

.triage-btn.visitor i {
    color: #1976D2;
}

/* Sub-choice buttons (Vehicle/Walking) */
.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.choice-btn {
    height: 100px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    background: white;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.choice-btn i {
    font-size: 32px;
    color: #666;
}

.choice-btn:hover {
    border-color: var(--primary);
    background: #f5f5f5;
}

.choice-btn:active {
    transform: scale(0.98);
}

/* Three-column grid for visitor transport */
.choice-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.choice-grid-three .choice-btn {
    height: 90px;
    font-size: 13px;
}

.choice-grid-three .choice-btn i {
    font-size: 28px;
}

/* Destination Buttons */
.dest-btn {
    width: 100%;
    padding: 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.dest-btn:hover {
    border-color: var(--primary);
    background: #f9f9f9;
}

.dest-btn i {
    font-size: 20px;
    color: #666;
}

.dest-btn .fa-chevron-right {
    color: var(--primary);
}

/* Back Button */
.back-btn {
    background: none;
    border: none;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    padding: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--primary);
}

.back-btn i {
    font-size: 16px;
}

/* Smart Input Styling */
.smart-input {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* List Sections */
.list-section {
    margin-top: 20px;
    background: #fafafa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow: hidden;
}

#pendingList {
    max-height: 300px;
    overflow-y: auto;
}

.list-header {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-header i {
    color: var(--primary);
}

.list-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.list-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.list-item.pending {
    border-left: 4px solid #F9A825;
}

.list-item.arrival {
    border-left: 4px solid #2E7D32;
}

.list-item button {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Enhanced Exit Item Cards */
.exit-item-enhanced {
    background: white;
    margin-bottom: 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    border: 1px solid #eee;
}

.exit-item-content {
    flex: 1;
    margin-right: 12px;
}

.exit-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.exit-identifier {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    display: block;
}

.exit-meta-row {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.exit-meta-row i {
    font-size: 12px;
    opacity: 0.7;
}

.meta-divider {
    color: #ccc;
    font-weight: 300;
}

.exit-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.exit-btn:hover {
    background: #B71C1C;
    transform: scale(1.05);
}

.exit-btn:active {
    transform: scale(0.95);
}

/* Grace Section */
.grace-section {
    margin-top: 30px;
    text-align: center;
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.grace-section p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Grace Modal */
.grace-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.grace-modal {
    background: white;
    width: 90%;
    max-width: 420px;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.grace-modal h2 {
    color: #FB8C00;
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grace-modal h2 i {
    font-size: 24px;
}

.grace-modal p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.grid-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

/* Result Card Enhancement */
.status-card {
    display: none;
    margin: 30px 20px;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-card.active {
    display: block;
    animation: slideUp 0.4s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-card i {
    font-size: 60px;
    margin-bottom: 15px;
    display: block;
}

#resTitle {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

#resBody {
    font-size: 16px;
    opacity: 0.95;
}

.status-warning {
    background: #FB8C00;
}

/* Offline Indicator Enhancement */
#offlineIndicator {
    background: linear-gradient(135deg, var(--danger) 0%, #B71C1C 100%);
    color: white;
    text-align: center;
    padding: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

#offlineIndicator i {
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Content Padding */
.content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* Shift Info Bar */
.shift-info {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.shift-info span {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shift-info span i {
    color: var(--primary);
    font-size: 18px;
}

.shift-info button {
    color: var(--danger);
    background: none;
    border: none;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.shift-info button:hover {
    background: rgba(211, 47, 47, 0.1);
}

/* Header Enhancement */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

header span {
    display: flex;
    align-items: center;
    gap: 10px;
}

header span i {
    font-size: 20px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== GLOBAL ERROR BANNER ===== */
#globalError {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    color: white;
    padding: 15px 20px;
    z-index: 9999;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* ===== BUTTON ENHANCEMENTS ===== */
.btn-entry {
    background: linear-gradient(135deg, var(--primary) 0%, #1B5E20 100%);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-entry:active {
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.btn-exit {
    background: linear-gradient(135deg, var(--danger) 0%, #B71C1C 100%);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-exit:active {
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* ===== FORM GROUP SPACING ===== */
.form-group {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

/* ===== STEP TITLE STYLING ===== */
.step-section h2,
.step-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: #333;
    text-align: center;
}

.step-section p {
    margin: 0 0 15px 0;
}

/* ===== ARRIVAL ITEM STYLING ===== */
.arrival-item {
    background: white;
    margin: 5px 0;
    padding: 12px;
    border-radius: 8px;
    border-left: 5px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.arrival-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.arrival-item b {
    font-size: 16px;
    color: #333;
}

/* ===== SELECT STYLING ===== */
select {
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 400px) {
    .triage-grid {
        grid-template-columns: 1fr;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .choice-grid-three {
        grid-template-columns: 1fr;
    }

    .triage-btn,
    .choice-btn {
        height: 80px;
    }

    .grid-buttons {
        grid-template-columns: 1fr;
    }
}

/* ===== LOADING STATE ===== */
.btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== INFO TEXT STYLING ===== */
.info-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.info-text i {
    color: var(--primary);
}

/* ===== WIZARD NAVIGATION ===== */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.step-indicator i {
    color: var(--primary);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin: 10px 0;
}

/* ===== CONFIRMATION BADGE ===== */
.confirmation-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #FFF3E0;
    color: #F57F17;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* ===== SEARCH INPUT ENHANCEMENT ===== */
input[type="text"]#exitSearch,
input[type="text"]#estateSearchInput {
    background: white;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

input[type="text"]#exitSearch:focus,
input[type="text"]#estateSearchInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* ===== SHIFT CONTAINER RESPONSIVENESS ===== */
@media (max-width: 420px) {
    .shift-container {
        width: 95%;
    }

    .grace-modal {
        width: 95%;
    }
}

/* ===== CARD SHADOW DEPTH ===== */
.status-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.list-item:active {
    transform: scale(0.98);
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== FOCUS VISIBLE FOR ACCESSIBILITY ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ===== BOTTOM SHEET UI ===== */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.sheet-overlay.active {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 3001;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bottom-sheet.active {
    transform: translateX(-50%) translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 0 auto 20px auto;
}

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    text-align: center;
}

.sheet-body {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 25px;
    text-align: center;
}

.sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sheet-actions .btn-large {
    padding: 15px;
    font-size: 16px;
}

.sheet-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Print safety */
@media print {

    .sheet-overlay,
    .bottom-sheet {
        display: none !important;
    }
}

.ai-hint {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-left: 4px solid #2196F3;
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    color: #1565C0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-hint i {
    font-size: 20px;
    color: #1976D2;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    gap: 10px;
}

/* ===== TEAM BAR ===== */
#teamBar {
    background: #f5f5f5;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
}

.team-bar-label {
    font-size: 10px;
    color: #777;
    font-weight: bold;
    text-transform: uppercase;
}

#teamList {
    display: flex;
    gap: 8px;
}

#btnAddMember {
    background: white;
    border: 1px dashed #999;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
}

/* ===== WIZARD STEP SUBTITLE ===== */
.step-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0 0 20px 0;
}

/* ===== SHUTTLE INFO ===== */
#shuttleDetails {
    background: #e8f5e9;
    border: 1px solid #2e7d32;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

/* ===== MPV PLATE DISPLAY BAR ===== */
.mpv-plate-bar {
    background: #eee;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

/* ===== NAME INPUT ROW ===== */
.name-input-row {
    display: flex;
    gap: 8px;
}

/* ===== PULL QUEUE BUTTON ===== */
#btnPullQueue {
    width: 50px;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

#btnPullQueue i {
    color: #2E7D32;
}

/* ===== OCCUPANT LIST ===== */
#occupantList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* ===== RESULT ALIGHT BUTTON ===== */
#btnAlight {
    margin-top: 20px;
}

/* ===== HELPER / HINT TEXT ===== */
.helper-text {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 0;
}

/* ===== GRACE WIZARD HEADER ===== */
.grace-wizard-header {
    margin-bottom: 20px;
}

.grace-wizard-header h2 {
    text-align: center;
    margin: 0;
    color: #FB8C00;
    font-size: 20px;
}

.grace-wizard-header p {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

/* ===== SOS MODAL ===== */
.sos-modal h2 {
    color: #D32F2F;
}

.sos-broadcast-notice {
    text-align: center;
    font-weight: 600;
}

/* ===== VERIFY PASS MODAL ===== */
#verifyPassDetails {
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

#passCodeInput {
    margin-bottom: 10px;
}

#btnMoveToPending {
    margin-top: 10px;
}

/* ===== EXIT PIN MODAL ===== */
#exitVerifyDetails {
    text-align: center;
    color: #555;
    margin-bottom: 15px;
}

/* ===== FORM GROUP FLUSH (no padding) ===== */
.form-group-flush {
    padding: 0;
}

/* ===== GRID BUTTONS SPACED ===== */
.grid-buttons-spaced {
    margin-top: 20px;
}

/* ===== MEMBER MODAL ===== */
#memberModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.member-modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.member-modal-content h3 {
    margin-top: 0;
}

.member-modal-content select,
.member-modal-content input[type="password"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.member-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-member-cancel {
    padding: 10px 20px;
    background: #ddd;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-member-submit {
    padding: 10px 20px;
    background: #2E7D32;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

#arrivalsList {
    max-height: 250px;
    overflow-y: auto;
}

#arrivalSearch {
    padding: 8px;
    font-size: 14px;
}

.arrivals-search-group {
    padding: 0;
    margin-bottom: 10px;
}

/* ===== EXIT WIZARD ===== */

/* Driver chip — locked, non-selectable */
.exit-wiz-driver-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-left: 4px solid #555;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

/* Result summary rows */
.exit-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.3s ease;
}

/* Status badge on result rows */
.exit-result-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* PIN loop progress header */
.exit-pin-header {
    background: #f5f5f5;
    padding: 14px 20px;
    border-bottom: 2px solid #e0e0e0;
    margin: -20px -20px 20px -20px;
    border-radius: 0;
}

/* Person card in PIN step */
.exit-pin-person-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px 20px;
    margin: 0 0 20px 0;
    text-align: center;
}

/* Pedestrian search results */
#pedSearchResults {
    max-height: 350px;
    overflow-y: auto;
    margin-top: 10px;
}

/* General search results dropdown */
.general-search-results {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 2px;
}

.general-search-result-row {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}

.general-search-result-row:hover {
    background: #f5f5f5;
}

.general-search-result-row:last-child {
    border-bottom: none;
}

/* Exit wizard container padding */
#exit-wizard-container {
    padding-bottom: 80px;
}

/* ALPR highlight on pre-filled plate input */
.alpr-prefilled {
    border-color: #FBC02D !important;
    box-shadow: 0 0 0 3px rgba(251, 192, 45, 0.2) !important;
}