/**
 * Zaya Health Unified Branding CSS - CLINICAL EDITION
 * Applied to ALL auxiliary dashboards for consistent visual identity
 * Based on zaya-responsive.html website styling
 *
 * DESIGN PHILOSOPHY:
 * - Clean white backgrounds (clinical, professional)
 * - Turquoise (#17658b) used as ACCENT COLOR ONLY
 * - Subtle hints of turquoise on hover/active states
 * - No overwhelming color blocks
 * - Professional healthcare aesthetic
 *
 * LOGO: Use /public/zayawhite.png (turquoise logo on white bg)
 *
 * VERSION: 2.0.0 - Clinical White Edition
 * LAST UPDATED: 2025-10-03
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ========================================
   ZAYA HEALTH COLOR SYSTEM
   ======================================== */
:root {
    /* Primary Zaya Turquoise Palette */
    --zaya-primary: #17658b !important;
    --zaya-dark: #0d4463 !important;
    --zaya-light: #2a8fc4 !important;

    /* Accent Colors */
    --gold-accent: #FFB800 !important;
    --coral-accent: #FF6B6B !important;
    --deep-purple: #6B5B95 !important;

    /* Background Colors */
    --midnight: #0A0E27 !important;
    --dark-blue: #141B3C !important;
    --pure-white: #FFFFFF !important;
    --off-white: #F8F9FA !important;
    --bg-primary: #F0F4F8 !important;
    --bg-secondary: #E6FFFA !important;
    --bg-accent: #B2F5EA !important;

    /* Text Colors */
    --text-dark: #1A202C !important;
    --text-medium: #4A5568 !important;

    /* Glass Effects */
    --glass-white: rgba(255, 255, 255, 0.1) !important;
    --glass-dark: rgba(10, 14, 39, 0.7) !important;
    --glass-light: rgba(255, 255, 255, 0.7) !important;
    --glass-teal: rgba(23, 101, 139, 0.2) !important;

    /* Legacy Overrides (to replace old colors) */
    --primary-color: #17658b !important;
    --secondary-color: #2a8fc4 !important;
    --accent-color: #0d4463 !important;
    --success-color: #4CAF50 !important;
    --warning-color: #FFB800 !important;
    --error-color: #F44336 !important;
    --info-color: #2a8fc4 !important;
}

/* ========================================
   GLOBAL RESETS & TYPOGRAPHY
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    background: #FFFFFF !important;  /* Clean white background */
    color: var(--text-dark) !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
    font-weight: 600;
    color: #1A202C !important;  /* Dark text, not turquoise */
}

/* ========================================
   BUTTON OVERRIDES
   ======================================== */
button,
.btn,
.button,
input[type="button"],
input[type="submit"],
.btn-primary,
.primary-button {
    background: var(--zaya-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

button:hover,
.btn:hover,
.button:hover,
.btn-primary:hover {
    background: var(--zaya-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 101, 139, 0.3);
}

.btn-secondary,
.secondary-button {
    background: var(--zaya-light) !important;
    color: white !important;
}

.btn-success {
    background: var(--success-color) !important;
}

.btn-warning {
    background: var(--gold-accent) !important;
    color: var(--text-dark) !important;
}

.btn-danger,
.btn-error {
    background: var(--coral-accent) !important;
}

/* ========================================
   HEADER/NAVBAR OVERRIDES
   ======================================== */
header,
.header,
.navbar,
.top-bar,
.dashboard-header,
nav {
    background: #FFFFFF !important;  /* White header */
    color: #1A202C !important;
    border-bottom: 2px solid #E5E7EB !important;  /* Subtle gray border */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.navbar-brand,
.logo,
.header-title {
    color: #1A202C !important;  /* Dark text */
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif !important;
}

/* Logo image styling */
.logo img,
.navbar-brand img,
header img[src*="zaya"] {
    max-height: 40px;
    width: auto;
}

nav a,
.nav-link,
.menu-item {
    color: #4A5568 !important;  /* Medium gray text */
    transition: all 0.3s ease;
}

nav a:hover,
.nav-link:hover,
.menu-item:hover {
    color: var(--zaya-primary) !important;  /* Turquoise on hover - accent only */
    background: rgba(23, 101, 139, 0.05) !important;  /* Very subtle turquoise background */
}

/* ========================================
   SIDEBAR OVERRIDES
   ======================================== */
.sidebar,
.side-menu,
aside {
    background: #F9FAFB !important;  /* Very light gray, clinical */
    color: #1A202C !important;
    border-right: 1px solid #E5E7EB !important;  /* Subtle border */
}

.sidebar a,
.sidebar-item,
.menu-item {
    color: #4A5568 !important;  /* Medium gray text */
    transition: all 0.3s ease;
}

.sidebar a:hover,
.sidebar-item:hover,
.sidebar a.active {
    background: rgba(23, 101, 139, 0.08) !important;  /* Very subtle turquoise tint */
    color: var(--zaya-primary) !important;  /* Turquoise text on active/hover */
    border-left: 3px solid var(--zaya-primary) !important;  /* Turquoise accent bar */
}

/* ========================================
   CARD OVERRIDES
   ======================================== */
.card,
.dashboard-card,
.widget,
.panel {
    background: white !important;
    border: 1px solid #E5E7EB !important;  /* Light gray border */
    border-radius: 8px !important;  /* Slightly less rounded for clinical look */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;  /* Subtle shadow */
    transition: all 0.3s ease;
}

.card:hover,
.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;  /* Subtle hover shadow */
    border-color: var(--zaya-primary) !important;  /* Turquoise border on hover - accent */
    transform: translateY(-1px);
}

.card-header,
.card-title {
    background: #FFFFFF !important;  /* White header, not turquoise */
    color: #1A202C !important;  /* Dark text */
    font-weight: 600;
    border-bottom: 2px solid var(--zaya-primary) !important;  /* Turquoise accent line */
    border-radius: 8px 8px 0 0 !important;
}

/* ========================================
   TABLE OVERRIDES
   ======================================== */
table,
.table {
    border-collapse: collapse;
    width: 100%;
}

thead,
.table-header,
th {
    background: #F9FAFB !important;  /* Light gray header, not turquoise */
    color: #1A202C !important;  /* Dark text */
    font-weight: 600;
    border-bottom: 2px solid var(--zaya-primary) !important;  /* Turquoise accent line */
}

tbody tr:hover,
.table-row:hover {
    background: rgba(23, 101, 139, 0.04) !important;  /* Very subtle turquoise tint */
    cursor: pointer;
}

tbody tr:nth-child(even) {
    background: #FAFAFA !important;  /* Very light gray stripe */
}

/* ========================================
   FORM OVERRIDES
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select,
.form-control,
.input-field {
    border: 2px solid rgba(23, 101, 139, 0.3) !important;
    border-radius: 8px !important;
    padding: 10px 15px;
    transition: all 0.3s ease;
    background: white !important;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    border-color: var(--zaya-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px var(--glass-teal) !important;
}

label,
.form-label {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin-bottom: 5px;
}

/* ========================================
   BADGE/TAG OVERRIDES
   ======================================== */
.badge,
.tag,
.label,
.status-badge {
    border-radius: 20px !important;
    padding: 4px 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary,
.status-active {
    background: var(--zaya-primary) !important;
    color: white !important;
}

.badge-success,
.status-approved {
    background: var(--success-color) !important;
    color: white !important;
}

.badge-warning,
.status-pending {
    background: var(--gold-accent) !important;
    color: var(--text-dark) !important;
}

.badge-danger,
.status-rejected {
    background: var(--coral-accent) !important;
    color: white !important;
}

/* ========================================
   MODAL OVERRIDES
   ======================================== */
.modal,
.popup,
.dialog {
    background: rgba(10, 14, 39, 0.8) !important;
}

.modal-content,
.modal-body {
    background: white !important;
    border-radius: 16px !important;
    border: 2px solid var(--zaya-primary) !important;
}

.modal-header {
    background: linear-gradient(135deg, var(--zaya-primary), var(--zaya-light)) !important;
    color: white !important;
    border-radius: 16px 16px 0 0 !important;
}

/* ========================================
   CHART/GRAPH OVERRIDES
   ======================================== */
.chart-container,
.graph-container {
    background: white !important;
    border-radius: 12px !important;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(23, 101, 139, 0.1) !important;
}

/* ========================================
   ICON COLOR OVERRIDES
   ======================================== */
i,
.icon,
.material-icons,
.bi {
    color: #4A5568 !important;  /* Medium gray by default, not turquoise everywhere */
}

/* Use turquoise for specific icon contexts */
.icon-primary,
.active-icon,
button i,
.btn i {
    color: var(--zaya-primary) !important;  /* Turquoise in buttons/active states */
}

.icon-success {
    color: var(--success-color) !important;
}

.icon-warning {
    color: var(--gold-accent) !important;
}

.icon-error {
    color: var(--coral-accent) !important;
}

/* ========================================
   LINK OVERRIDES
   ======================================== */
a {
    color: var(--zaya-primary) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--zaya-dark) !important;
    text-decoration: underline;
}

/* ========================================
   SCROLLBAR OVERRIDES
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--off-white) !important;
}

::-webkit-scrollbar-thumb {
    background: var(--zaya-primary) !important;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--zaya-dark) !important;
}

/* ========================================
   ANIMATION UTILITIES
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* ========================================
   MOBILE RESPONSIVE OVERRIDES
   ======================================== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .card,
    .dashboard-card {
        border-radius: 8px !important;
    }

    button,
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    * {
        background: white !important;
        color: black !important;
    }

    header,
    .sidebar,
    button {
        display: none !important;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
*:focus-visible {
    outline: 3px solid var(--gold-accent) !important;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
