/**
 * Heather's Houses Branding Styles
 * Applies company branding (colors, fonts, logo) to the Employee Training Platform
 *
 * Color Scheme:
 * - Primary Deep Blue: #105378
 * - Secondary Light Blue: #1a80b6
 * - Green Accent: #65bc7b
 * - Neutrals: Whites and grays
 *
 * Typography:
 * - Headings: 'Yanone Kaffeesatz', sans-serif
 * - Body: 'Inter', sans-serif
 */

/* ========================================
   Google Fonts Import
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Yanone+Kaffeesatz:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ========================================
   CSS Variables for Brand Colors
   ======================================== */
:root {
    /* Primary Colors */
    --hh-primary-deep-blue: #105378;
    --hh-secondary-light-blue: #1a80b6;
    --hh-accent-green: #65bc7b;

    /* Neutral Colors */
    --hh-gray-dark: #6f7a8c;
    --hh-gray-medium: #747474;
    --hh-gray-light: #e1e5e9;
    --hh-white: #ffffff;

    /* Gradient */
    --hh-gradient-blue: linear-gradient(135deg, #105378 0%, #1a80b6 100%);
    --hh-gradient-blue-hover: linear-gradient(135deg, #0d4260 0%, #1569 95 100%);

    /* Button Gradient */
    --hh-button-gradient: linear-gradient(135deg, #1a80b6 0%, #65bc7b 100%);
    --hh-button-gradient-hover: linear-gradient(135deg, #156995 0%, #52a568 100%);

    /* Typography */
    --hh-font-heading: 'Yanone Kaffeesatz', sans-serif;
    --hh-font-body: 'Inter', sans-serif;

    /* Spacing & Effects */
    --hh-border-radius: 8px;
    --hh-border-radius-large: 12px;
    --hh-shadow-subtle: 0 2px 4px rgba(16, 83, 120, 0.1);
    --hh-shadow-medium: 0 4px 6px rgba(16, 83, 120, 0.15);
    --hh-shadow-large: 0 8px 25px rgba(16, 83, 120, 0.2);
    --hh-transition-smooth: all 0.3s ease;
}

/* ========================================
   Global Typography
   ======================================== */
body {
    font-family: var(--hh-font-body);
    background: var(--hh-gradient-blue);
    color: #333;
}

h1, h2, h3, h4, h5, h6,
.card-title,
.logo,
.login-header h1,
.page-title {
    font-family: var(--hh-font-heading);
    font-weight: 600;
}

/* ========================================
   Admin Sidebar Layout
   ======================================== */

/* Left Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--hh-white);
    box-shadow: 2px 0 10px rgba(16, 83, 120, 0.1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 2px solid var(--hh-gray-light);
}

.sidebar-logo {
    display: block;
    margin: 0 auto 15px;
}

.sidebar-logo-image {
    height: 49px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-title {
    font-family: var(--hh-font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--hh-primary-deep-blue);
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav-item {
    margin: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--hh-gray-dark);
    text-decoration: none;
    font-family: var(--hh-font-body);
    font-weight: 500;
    transition: var(--hh-transition-smooth);
    border-left: 3px solid transparent;
}

.sidebar-nav-link:hover {
    background: rgba(26, 128, 182, 0.08);
    color: var(--hh-secondary-light-blue);
    border-left-color: var(--hh-secondary-light-blue);
}

.sidebar-nav-link.active {
    background: rgba(26, 128, 182, 0.12);
    color: var(--hh-primary-deep-blue);
    border-left-color: var(--hh-secondary-light-blue);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

/* Top Header Bar */
.admin-top-header {
    position: fixed;
    left: 260px;
    top: 0;
    right: 0;
    height: 60px;
    background: var(--hh-white);
    box-shadow: 0 2px 4px rgba(16, 83, 120, 0.08);
    z-index: 999;
    display: flex;
    align-items: center;
}

.top-header-content {
    width: 100%;
    padding: 0 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-family: var(--hh-font-body);
    font-weight: 600;
    color: var(--hh-primary-deep-blue);
    font-size: 0.9rem;
}

/* Main Content Wrapper */
.admin-content-wrapper {
    margin-left: 260px;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    padding: 20px;
}

/* Legacy styles for backward compatibility */
.admin-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--hh-shadow-medium);
}

.logo {
    font-family: var(--hh-font-heading);
    color: var(--hh-primary-deep-blue);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Add logo image styling */
.logo-image {
    height: 70px;
    width: auto;
    display: block;
}

/* Navigation */
.admin-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--hh-shadow-subtle);
}

.nav-link {
    color: var(--hh-gray-dark);
    font-weight: 500;
    transition: var(--hh-transition-smooth);
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(26, 128, 182, 0.1);
    color: var(--hh-secondary-light-blue);
    border-bottom-color: var(--hh-secondary-light-blue);
}

/* ========================================
   Buttons & CTAs
   ======================================== */
.btn {
    border-radius: var(--hh-border-radius);
    font-family: var(--hh-font-body);
    font-weight: 600;
    transition: var(--hh-transition-smooth);
    box-shadow: var(--hh-shadow-subtle);
}

.btn-primary,
.google-btn {
    background: var(--hh-button-gradient);
    color: white;
    border: none;
}

.btn-primary:hover,
.google-btn:hover {
    background: var(--hh-button-gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--hh-shadow-large);
}

.btn-success {
    background: var(--hh-accent-green);
    color: white;
}

.btn-success:hover {
    background: #52a568;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--hh-gray-medium);
    color: white;
}

.btn-secondary:hover {
    background: var(--hh-gray-dark);
}

.logout-btn {
    background: #dc3545 !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--hh-transition-smooth);
    display: inline-block;
}

.logout-btn:hover {
    background: #c82333 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ========================================
   Cards & Containers
   ======================================== */
.card {
    border-radius: var(--hh-border-radius-large);
    box-shadow: var(--hh-shadow-medium);
    transition: var(--hh-transition-smooth);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hh-shadow-large);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--hh-gray-light);
}

.card-title {
    color: var(--hh-primary-deep-blue);
}

/* ========================================
   Forms & Inputs
   ======================================== */
.form-label {
    font-family: var(--hh-font-body);
    font-weight: 600;
    color: var(--hh-primary-deep-blue);
}

.form-input,
.form-textarea,
.form-select {
    border: 2px solid var(--hh-gray-light);
    border-radius: var(--hh-border-radius);
    font-family: var(--hh-font-body);
    transition: var(--hh-transition-smooth);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--hh-secondary-light-blue);
    box-shadow: 0 0 0 3px rgba(26, 128, 182, 0.1);
}

/* ========================================
   Login Page Styling
   ======================================== */
.login-container {
    border-radius: 20px;
    box-shadow: var(--hh-shadow-large);
}

.login-header {
    background: var(--hh-gradient-blue);
    color: white;
}

.login-header h1 {
    font-family: var(--hh-font-heading);
    font-weight: 700;
}

/* Google Sign-in Button */
.google-btn {
    background: white;
    border: 2px solid var(--hh-secondary-light-blue);
    color: var(--hh-primary-deep-blue);
    border-radius: var(--hh-border-radius-large);
    font-family: var(--hh-font-body);
}

.google-btn:hover {
    border-color: var(--hh-primary-deep-blue);
    box-shadow: 0 4px 12px rgba(26, 128, 182, 0.3);
    background: rgba(26, 128, 182, 0.05);
}

/* ========================================
   Alert Messages
   ======================================== */
.alert {
    border-radius: var(--hh-border-radius);
    font-family: var(--hh-font-body);
}

.alert-success,
.success-message {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid var(--hh-accent-green);
}

.alert-error,
.error-message {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.info-box {
    background: rgba(26, 128, 182, 0.1);
    border: 1px solid rgba(26, 128, 182, 0.3);
    border-radius: var(--hh-border-radius);
    color: var(--hh-primary-deep-blue);
}

/* ========================================
   Status Badges
   ======================================== */
.status-badge {
    border-radius: 20px;
    font-family: var(--hh-font-body);
    font-weight: 600;
}

.status-active {
    background: rgba(101, 188, 123, 0.2);
    color: #065f46;
}

.status-inactive {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.status-pending {
    background: rgba(26, 128, 182, 0.2);
    color: var(--hh-primary-deep-blue);
}

/* ========================================
   Tables
   ======================================== */
.table {
    border-radius: var(--hh-border-radius);
    box-shadow: var(--hh-shadow-subtle);
}

.table th {
    background: rgba(26, 128, 182, 0.1);
    color: var(--hh-primary-deep-blue);
    font-family: var(--hh-font-heading);
    font-weight: 600;
}

.table tbody tr:hover {
    background: rgba(26, 128, 182, 0.05);
}

/* ========================================
   Loading Spinner
   ======================================== */
.spinner {
    border-top-color: var(--hh-secondary-light-blue);
}

/* ========================================
   Links
   ======================================== */
a {
    color: var(--hh-secondary-light-blue);
    transition: var(--hh-transition-smooth);
}

a:hover {
    color: var(--hh-primary-deep-blue);
}

/* ========================================
   Background Gradients
   ======================================== */
body {
    background: var(--hh-gradient-blue);
}

/* For pages with alternate backgrounds */
.bg-gradient-primary {
    background: var(--hh-gradient-blue);
}

/* ========================================
   User Name Display
   ======================================== */
.user-name {
    font-weight: 600;
    color: var(--hh-primary-deep-blue);
    font-family: var(--hh-font-body);
}

/* ========================================
   Secure Badge
   ======================================== */
.secure-badge {
    color: var(--hh-gray-dark);
    font-family: var(--hh-font-body);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    /* Sidebar becomes full width on mobile, slides in/out */
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .admin-top-header {
        left: 0;
    }

    .admin-content-wrapper {
        margin-left: 0;
    }

    .sidebar-logo-image {
        height: 40px;
    }

    .sidebar-title {
        font-size: 1.2rem;
    }

    /* Legacy responsive styles */
    .logo-image {
        height: 60px;
    }

    .logo {
        font-size: 1.2rem;
    }
}

/* ========================================
   Animation Keyframes
   ======================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Print Styles (for certificates, etc.)
   ======================================== */
@media print {
    body {
        background: white;
    }

    .admin-header,
    .admin-nav,
    .btn,
    .logout-btn {
        display: none;
    }
}
