:root {
    --rmo-blue: #1e3a8a;
    --rmo-gold: #c59d5f;
    --rmo-blue-light: #3b82f6;
    --bg-light: #f3f4f6;
    --text-dark: #1f2937;
    --error-red: #dc2626;
    --success-green: #059669;
    --warning-yellow: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, var(--rmo-blue) 0%, var(--rmo-blue-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container { width: 100%; max-width: 420px; }

.login-box {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
    border-top: 5px solid var(--rmo-gold);
}

.logo {
    width: 120px;
    height: auto;
    margin: 0 auto 24px;
    display: block;
}

h1 {
    color: var(--rmo-blue);
    text-align: center;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 40px;
    font-size: 15px;
}

.form-group { margin-bottom: 24px; }

label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--rmo-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.input-select, .input-text {
    margin-bottom: 12px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--rmo-blue) 0%, var(--rmo-blue-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
    padding: 10px 20px;
    background: white;
    color: var(--rmo-blue);
    border: 2px solid var(--rmo-blue);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover { background: var(--rmo-blue); color: white; }

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--success-green) 0%, #047857 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.error {
    background: #fee2e2;
    color: var(--error-red);
    padding: 14px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    border-left: 4px solid var(--error-red);
}

.hidden { display: none !important; }

.footer {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    margin-top: 32px;
}

/* Dashboard */
.dashboard-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-top: 4px solid var(--rmo-gold);
}

.dashboard-header h1 {
    font-size: 20px;
    text-align: left;
    margin: 0;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.card-title {
    color: var(--rmo-blue);
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.status-box {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.status-box.success { background: #d1fae5; color: #065f46; }
.status-box.error { background: #fee2e2; color: #991b1b; }
.status-box.warning { background: #fef3c7; color: #92400e; }

.loading { color: #6b7280; text-align: center; padding: 20px; }

.contract-item {
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--rmo-blue);
}

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.contract-name {
    font-weight: 700;
    color: var(--rmo-blue);
}

.contract-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.contract-badge.commercial { background: #dbeafe; color: #1e40af; }
.contract-badge.residential { background: #fef3c7; color: #92400e; }

.contract-details {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.checkin-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.checkin-item.check_in { border-left: 3px solid var(--rmo-blue); }
.checkin-item.check_out { border-left: 3px solid var(--success-green); }

.session-info {
    background: #ecfdf5;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: center;
    border: 2px solid var(--success-green);
}

.session-time {
    font-size: 32px;
    font-weight: 700;
    color: var(--success-green);
    font-family: monospace;
}

@media (max-width: 480px) {
    .login-box { padding: 32px 24px; }
    h1 { font-size: 24px; }
    .dashboard-header { flex-direction: column; gap: 12px; text-align: center; }
    .dashboard-header h1 { text-align: center; }
}

/* ═══════════════════════════════════════════════════════════
   BANNER OFFLINE/ONLINE
   ═══════════════════════════════════════════════════════════ */

.network-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.network-banner.show {
    transform: translateY(0);
}

.network-banner.online {
    background: #10b981;
    color: white;
}

.network-banner.offline {
    background: #f59e0b;
    color: white;
}

.network-banner-icon {
    margin-right: 8px;
}
