/* Swasthya-Setu Hospital Management System - Unified Frontend Theme */
.hms-unified-app-container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
}

/* Unified Mobile Login Card */
.hms-mobile-login-card {
    max-width: 520px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.hms-login-icon {
    font-size: 44px;
    margin-bottom: 8px;
}

.hms-login-header h2 {
    margin: 0 0 4px 0;
    color: #0f766e;
    font-size: 22px;
    font-weight: 800;
}

.hms-login-tagline {
    margin: 0 0 16px 0;
    color: #64748b;
    font-size: 13px;
}

.hms-role-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 22px;
}

.role-pill {
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.hms-login-input-group {
    text-align: left;
    margin-bottom: 18px;
}

.hms-login-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #334155;
}

.hms-phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    transition: border-color 0.2s ease;
}

.hms-phone-input-wrapper:focus-within {
    border-color: #0d9488;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.country-code {
    padding: 12px 14px;
    background: #e2e8f0;
    font-weight: 800;
    color: #1e293b;
    font-size: 14px;
    border-right: 1px solid #cbd5e1;
}

.hms-phone-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    outline: none;
}

.hms-login-submit-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
}

/* Demo Badges Grid */
.hms-demo-accounts-section {
    margin-top: 25px;
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

.demo-divider {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
}

.demo-divider span {
    background: #ffffff;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.demo-badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.demo-badge-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.demo-badge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.doc-badge:hover { background: #f0fdfa; border-color: #0d9488; }
.staff-badge:hover { background: #f0f9ff; border-color: #0284c7; }
.lab-badge:hover { background: #faf5ff; border-color: #7c3aed; }
.bo-badge:hover { background: #fffbeb; border-color: #f59e0b; }
.pat-badge:hover { background: #f0fdf4; border-color: #10b981; }

.demo-badge-btn strong { font-size: 12px; color: #1e293b; margin-top: 2px; }
.demo-badge-btn small { font-size: 11px; color: #64748b; font-family: monospace; }
.badge-icon { font-size: 16px; }

/* Top Portal Navigation Bar */
.hms-portal-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.hms-top-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo { font-size: 26px; }
.brand-text h3 { margin: 0; font-size: 16px; color: #0f766e; }
.brand-text small { margin: 0; color: #64748b; font-size: 11px; }

.hms-top-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-role-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.role-doctor { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.role-staff { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.role-lab_assistant { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.role-back_office { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.role-patient { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 12px;
}

.user-info-text strong { color: #1e293b; }
.user-info-text small { color: #64748b; }

.hms-btn-logout {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    cursor: pointer;
    font-weight: 700;
}

.hms-btn-logout:hover {
    background: #fca5a5;
}

/* Regular Portal Containers */
.hms-portal-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hms-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0d9488;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.hms-portal-title h2 { margin: 0 0 6px 0; color: #0f766e; font-size: 22px; font-weight: 700; }
.hms-portal-title p { margin: 0; color: #64748b; font-size: 13px; }

/* Tabs */
.hms-tab-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 24px;
    overflow-x: auto;
}

.hms-tab-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    padding: 10px 18px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hms-tab-btn:hover { background: #e2e8f0; color: #0f766e; }
.hms-tab-btn.active { background: #0d9488; color: #ffffff; border-color: #0d9488; }

.hms-tab-content { display: none; }
.hms-tab-content.active { display: block; }

/* Tables */
.hms-table { width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 13px; }
.hms-table th { background: #f1f5f9; color: #334155; text-align: left; padding: 12px 14px; font-weight: 600; border-bottom: 2px solid #cbd5e1; }
.hms-table td { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.hms-table tr:hover { background: #f8fafc; }

/* Buttons */
.hms-btn { display: inline-block; padding: 10px 20px; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; border: none; transition: background 0.2s ease; text-align: center; }
.hms-btn-primary { background: #0d9488; color: #ffffff !important; }
.hms-btn-primary:hover { background: #0f766e; }
.hms-btn-secondary { background: #0284c7; color: #ffffff !important; }
.hms-btn-secondary:hover { background: #0369a1; }
.hms-btn-success { background: #16a34a; color: #ffffff !important; }
.hms-btn-small { padding: 6px 12px; font-size: 12px; border-radius: 4px; text-decoration: none; background: #e2e8f0; color: #1e293b; border: 1px solid #cbd5e1; display: inline-block; cursor: pointer; }
.hms-btn-small:hover { background: #cbd5e1; }

/* Form inputs */
.hms-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.hms-form-group { display: flex; flex-direction: column; gap: 6px; }
.hms-form-group label { font-weight: 600; font-size: 13px; color: #334155; }
.hms-input, .hms-form-group input, .hms-form-group select, .hms-form-group textarea { width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.hms-input:focus, .hms-form-group input:focus, .hms-form-group select:focus, .hms-form-group textarea:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2); }

/* Badges */
.hms-token-badge { background: #0f766e; color: #ffffff; font-weight: 800; padding: 4px 10px; border-radius: 12px; font-size: 13px; display: inline-block; }
.hms-status-badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-waiting { background: #fef3c7; color: #92400e; }
.status-in_consultation { background: #e0f2fe; color: #0369a1; }
.status-completed { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-present { background: #dcfce7; color: #166534; }
.status-late { background: #fef3c7; color: #92400e; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-paid { background: #dcfce7; color: #166534; }
.status-active { background: #e0f2fe; color: #0369a1; }

/* Hospital Logo & Profile Branding Enhancements */
.hms-login-logo-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #0d9488;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.hms-top-logo-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1.5px solid #0d9488;
}

.hms-admin-tab-highlight {
    background: #f0fdfa !important;
    border-color: #99f6e4 !important;
    color: #0f766e !important;
    font-weight: 700 !important;
}

.hms-admin-tab-highlight.active {
    background: #0f766e !important;
    color: #ffffff !important;
}

.hms-logo-edit-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.logo-preview-wrapper {
    flex-shrink: 0;
}

.logo-preview-box {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px dashed #0d9488;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-input-wrapper {
    flex: 1;
}
