/* CSS Custom Properties for Dark/Light Theme */
:root {
    /* Light Theme (kept for reference) */
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8f9fa;
    --bg-dark-light: #1a1a1a;
    --text-primary-light: #333333;
    --text-secondary-light: #666666;
    --text-muted-light: #cccccc;
    --text-white-light: #ffffff;
    --accent-color-light: #ff4444;
    --accent-hover-light: #cc3333;
    --border-light: #dddddd;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-hover-light: rgba(0, 0, 0, 0.15);
    
    /* Dark Theme (default) */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-dark: #0f0f0f;
    --header-bg: #222;
    --sidebar-bg: #222;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --text-white: #ffffff;
    --accent-color: #ff4444;
    --accent-hover: #ff6666;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --card-bg: #242424;
    --input-bg: #333333;
    --input-border: #555555;
    --sidebar-bg: #222222;
    --header-bg: #222222;
    --modal-bg: #242424;
    --dropdown-bg: #2a2a2a;
    --tooltip-bg: #333333;
}

/* Light Theme Override */
body.light-theme {
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --bg-dark: var(--bg-dark-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --text-muted: var(--text-muted-light);
    --text-white: var(--text-white-light);
    --accent-color: var(--accent-color-light);
    --accent-hover: var(--accent-hover-light);
    --border: var(--border-light);
    --shadow: var(--shadow-light);
    --shadow-hover: var(--shadow-hover-light);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: var(--border-light);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 70px; /* For fixed header */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    min-height: 70px;
    background: var(--header-bg, #222);
    color: var(--text-white, #fff);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 2px 10px var(--shadow, rgba(0,0,0,0.2));
}
.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    font-size: 1.3rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.welcome-text {
    font-size: 1rem;
    color: #fff;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.logout-btn {
    margin-left: 1rem;
    padding: 0.5em 1.2em;
    border-radius: 4px;
    background: #444;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.logout-btn:hover {
    background: #666;
}
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 250px;
    height: calc(100vh - 70px);
    background: var(--sidebar-bg, #222);
    color: var(--text-white, #fff);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: left 0.3s;
    overflow-y: auto;
}
body, .main-container {
    padding-top: 70px;
}

/* Error/Info Message Padding */
.error-message, .loading-message, .no-units-message, .success-message, .warning-message {
    padding: 1.2em 1.5em;
    margin: 1em 0;
    border-radius: 6px;
    font-size: 1.05em;
    background: rgba(255,255,255,0.03);
    color: var(--accent-color, #ff4444);
    text-align: center;
}

/* Dashboard Clock and Clock In/Out Button */
#dashboard-clock {
    margin-left: 2em;
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
    letter-spacing: 0.5px;
}
#clock-inout-btn {
    margin-left: 1em;
    padding: 0.4em 1.1em;
    border-radius: 4px;
    background: #444;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}
#clock-inout-btn:hover {
    background: #666;
}

/* Navbar and Member Login Button Modern Styling */
.navbar {
    width: 100vw;
    min-width: 100vw;
    left: 0;
    right: 0;
    top: 0;
    position: fixed;
    background: var(--bg-dark, #181818);
    z-index: 1000;
    padding: 1.2rem 0;
    box-sizing: border-box;
    border-bottom: 2px solid #222; /* subtle separation */
    box-shadow: none;
}
body {
    padding-top: 70px; /* Adjust to navbar height */
}
.nav-container {
    width: 100vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0 48px;
    box-sizing: border-box;
    max-width: none;
}
.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}
.nav-logo i {
    margin-right: 10px;
    font-size: 2rem;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.nav-link,
.member-login {
    display: flex;
    align-items: center;
    height: 48px;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}
.nav-link {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}
.nav-link:hover {
    color: var(--accent-color);
}
.member-login {
    background: linear-gradient(135deg, var(--accent-color), #ff6666);
    color: var(--text-white) !important;
    padding: 16px 24px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-left: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.15);
}
.member-login:hover {
    background: linear-gradient(135deg, #ff6666, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
    color: var(--text-white) !important;
}
.member-login i {
    margin-right: 8px;
    font-size: 1.2em;
}

/* Member Login Section (Membership Page) */
.member-login-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
}

.member-login-section h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.member-login-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.member-portal-btn {
    font-size: 1.1rem;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent-color), #ff6666);
    transition: all 0.3s ease;
}

.member-portal-btn:hover {
    background: linear-gradient(135deg, #ff6666, var(--accent-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 68, 68, 0.4);
}

.member-portal-btn i {
    margin-right: 8px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
    color: var(--text-white);
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Emergency Banner */
.emergency-banner {
    background: var(--accent-color);
    color: var(--text-white);
    padding: 15px 0;
    text-align: center;
    font-weight: bold;
}

/* Membership Section */
.membership-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.membership-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.membership-text ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.membership-text li {
    margin-bottom: 0.5rem;
}

.membership-icon {
    font-size: 8rem;
    color: var(--accent-color);
    text-align: center;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--text-white);
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Hero Stats and Buttons */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Background variations */
.bg-light {
    background: var(--bg-secondary);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-hover);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Santa Tracker Section */
.santa-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.santa-details {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.santa-details p {
    margin-bottom: 0.5rem;
}

.santa-note {
    font-style: italic;
    color: var(--text-secondary);
}

.santa-icon {
    font-size: 8rem;
    color: var(--accent-color);
    text-align: center;
    display: block;
}

/* Events Section */
.events-content {
    max-width: 800px;
    margin: 0 auto;
}

.event-card {
    display: flex;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    margin-bottom: 2rem;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.event-date {
    background: var(--accent-color);
    color: var(--text-white);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-right: 2rem;
    min-width: 80px;
}

.event-date .month {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
}

.event-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.event-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.events-note {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* Apparatus Section */
.apparatus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.apparatus-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apparatus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-hover);
}

.apparatus-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.apparatus-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Photos Section */
.photos-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.photos-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Give Section */
.give-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.give-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.give-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.give-option {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.give-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.give-option h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    max-width: none;
    text-align: left;
}

.contact-item {
    display: flex;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 1rem;
    margin-top: 0.5rem;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-item p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.emergency-note {
    color: var(--text-secondary);
    font-style: italic;
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--input-border);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Footer */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Privacy Policy Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

body.modal-open {
    overflow: hidden;
}

/* Show modal when it has the 'show' class */
.modal.show {
    display: flex;
}

/* Privacy Policy Phone Number */
#privacy-modal a[href^="tel:"] {
    color: unset !important;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px var(--shadow);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color);
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Application Modal */
.application-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    padding: 15px;
}

.application-container {
    width: 100%;
    min-height: 600px;
}

.application-container iframe {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Navigation active state */
.nav-link.active {
    color: var(--accent-color);
}

/* Navigation Icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Shopping Cart Icon */
.cart-icon {
    position: relative;
    color: var(--text-white);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.cart-icon:hover {
    color: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--text-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Shop Section */
.shop-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.shop-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.shop-category {
    margin-bottom: 4rem;
}

.shop-category h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.shop-category h3 i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.product-image {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: var(--text-white);
    padding: 2rem;
    text-align: center;
}

.product-icon {
    font-size: 4rem;
}

.product-info {
    padding: 1.5rem;
}

.product-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 25px;
    overflow: hidden;
}

.qty-btn {
    background: var(--bg-secondary);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.qty-btn:hover {
    background: var(--border);
}

.qty-display {
    padding: 8px 16px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    background: var(--input-bg);
    color: var(--text-primary);
}

.add-to-cart-btn {
    background: var(--accent-color);
    color: var(--text-white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Donation Section */
.donation-section {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
}

.donation-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.donation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.preset-donations h4,
.custom-donation h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.donation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.donation-btn {
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.donation-btn:hover,
.donation-btn.selected {
    background: var(--accent-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

.custom-donation-input {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 25px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.custom-donation-input:focus-within {
    border-color: var(--accent-color);
}

.currency {
    padding: 12px 15px;
    background: var(--bg-secondary);
    font-weight: bold;
    color: var(--text-secondary);
}

.custom-donation-input input {
    border: none;
    padding: 12px;
    flex: 1;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

.add-donation-btn {
    background: var(--accent-color);
    color: var(--text-white);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.add-donation-btn:hover {
    background: var(--accent-hover);
}

/* Cart Modal */
.cart-modal-content {
    max-width: 600px;
}

.ticket-modal-content {
    max-width: 540px;
    margin: 5% auto;
    padding: 1.5rem 2rem;
}

.ticket-modal-section {
    margin-bottom: 1rem;
}

.ticket-summary-text {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-payment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.ticket-payment-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border, #dee2e6);
    cursor: pointer;
    background: var(--card-bg, #fff);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.ticket-payment-options input[type="radio"] {
    accent-color: var(--accent-color, #007bff);
}

.ticket-payment-options label:hover {
    border-color: var(--accent-color, #007bff);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.ticket-total-section {
    border-top: 1px solid var(--border, #dee2e6);
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.ticket-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.ticket-total-grand {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.ticket-modal-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.ticket-modal-message.info {
    color: #0d6efd;
}

.ticket-modal-message.error {
    color: #dc3545;
}

.ticket-modal-message.success {
    color: #198754;
}

.ticket-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.ticket-modal-actions .btn {
    min-width: 180px;
}

.ticket-modal-actions .btn-secondary {
    background: var(--border, #dee2e6);
    color: var(--text-primary);
}

.cart-modal-content h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

#cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.cart-item-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: bold;
    color: var(--accent-color);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.remove-item:hover {
    background: #c82333;
}

.cart-total {
    text-align: center;
    padding: 1rem 0;
    border-top: 2px solid var(--border);
    margin-bottom: 1rem;
}

.cart-total h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Checkout Modal */
.checkout-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-modal-content h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.order-summary {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    height: fit-content;
}

.order-summary h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
    text-align: center;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.payment-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    flex: 1;
}

.payment-option:hover {
    border-color: var(--accent-color);
}

.payment-option input[type="radio"] {
    margin-right: 0.5rem;
}

.payment-option input[type="radio"]:checked + span {
    color: var(--accent-color);
    font-weight: bold;
}

/* PayPal Section */
#paypal-button-container {
    margin: 1rem 0;
    min-height: 45px;
}

.payment-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .member-login {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .membership-content,
    .santa-content,
    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .event-date {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .services-grid,
    .apparatus-grid,
    .give-options,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .donation-options {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .donation-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-icons {
        gap: 0.5rem;
    }
    
    .theme-toggle,
    .cart-icon {
        font-size: 1.1rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .payment-methods {
        flex-direction: column;
    }
    
    .checkout-actions {
        justify-content: center;
    }
    
    .donation-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
    color: var(--text-white);
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Additional Page Styles */
.requirements-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.requirement-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 3px 10px var(--shadow);
}

.requirement-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 3px 10px var(--shadow);
}

.faq-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.maintenance-content {
    max-width: 800px;
    margin: 0 auto;
}

.maintenance-info h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.maintenance-info ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.maintenance-info li {
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.share-photos-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.share-option {
    text-align: center;
}

.share-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.share-option h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.events-social {
    text-align: center;
    margin-top: 2rem;
}

.visit-info {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.partnership-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.partnership-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.partnership-level {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partnership-level:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.partnership-level h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.partnership-level ul {
    padding-left: 1.5rem;
}

.partnership-level li {
    margin-bottom: 0.5rem;
}

/* Platinum Partner Special Styling */
.platinum-partner {
    border: 2px solid var(--accent-color);
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.platinum-partner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.platinum-partner:hover::before {
    left: 100%;
}

.platinum-partner h4 {
    font-size: 1.3rem;
    background: linear-gradient(45deg, var(--accent-color), #ff6666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.platinum-partner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow-hover);
}

.other-help {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.help-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.help-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.help-item h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .membership-icon,
    .santa-icon {
        font-size: 6rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* Additional Modal Styles for File Upload and Form Elements */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--accent-color);
    background: var(--card-bg);
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-upload-area p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.file-upload-area small {
    color: var(--text-muted);
}

.selected-files {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 5px;
    border: 1px solid var(--border);
}

.file-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 1rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
}

.file-size {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-remove {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.btn-remove:hover {
    background: var(--accent-hover);
}

.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff6666);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--accent-color);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-range span {
    color: var(--text-secondary);
    font-weight: 500;
}

.date-range input[type="date"] {
    flex: 1;
}

.empty-state,
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.error-state {
    color: var(--accent-color);
}

.form-textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    width: 100%;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #138496;
}

/* Apparatus Maintenance Styles */
.unit-maintenance {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.maintenance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 4px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.maintenance-item i:first-child {
    color: var(--text-secondary);
    width: 16px;
    text-align: center;
}

.maintenance-item span {
    flex: 1;
    color: var(--text-primary);
}

.maintenance-item.upcoming {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
    color: #856404;
}

.maintenance-item.upcoming i:first-child {
    color: #ffc107;
}

.maintenance-item.upcoming span {
    color: #856404;
}

.maintenance-item.overdue {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
    animation: pulse-warning 2s infinite;
}

.maintenance-item.overdue i:first-child {
    color: #dc3545;
}

.maintenance-item.overdue span {
    color: #721c24;
    font-weight: 600;
}

.maintenance-item.overdue .fa-exclamation-triangle {
    color: #dc3545;
    animation: blink 1.5s infinite;
}

@keyframes pulse-warning {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}
.dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}
.dashboard-modal .modal-content {
    background: #222;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.3);
    padding: 2rem;
    max-width: 600px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0;
}

/* Hamburger button */
.hamburger {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: none; /* Hidden by default, shown in media queries */
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hamburger:hover {
    background: var(--accent-color);
    color: var(--text-white);
    transform: scale(1.1);
}

.hamburger:active {
    transform: scale(0.95);
}

/* Responsive Design for Member Portal */
@media (max-width: 1024px) {
    .header { padding: 2.0rem; }
    .sidebar { width: 80px; } /* Collapse sidebar */
    .sidebar .nav-item span { display: none; } /* Hide text */
    .sidebar .nav-item i { margin-right: 0; } /* Center icon */
    .main-container { height: auto; flex-direction: column; } /* Stack on smaller screens */
    .content-area { padding: 1rem; flex-direction: column; }
    .schedule-section, .left-panel { flex: none !important; width: 100%; }
    .schedule-grid { grid-template-columns: 1fr; }
    .left-panel { margin-top: 1rem; }
    .panel-section { margin-bottom: 1rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .header-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .header-actions .btn { margin-bottom: 0.5rem; }
    .data-table-container { overflow-x: auto; }
    .data-table { min-width: 700px; } /* Ensure tables scroll horizontally if content is wide */
    .modal-content { width: 95%; margin: 2.5% auto; }
    .form-row { grid-template-columns: 1fr; } /* Stack form rows */
    .login-card { padding: 2rem; }
}
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px; /* Hide completely */
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 250px; /* Full width when open */
    }
    .sidebar.open { left: 0; }
    .hamburger { display: flex !important; position: fixed !important; top: 1rem !important; left: 1rem !important; z-index: 1100 !important; }
    .header { padding-left: 5rem; } /* Make space for hamburger */
    .main-container { margin-left: 0 !important; padding-top: 70px; width: 100% !important; }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .content-section { padding: 1rem; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .responsive-table { overflow-x: auto; display: block; }
    table { min-width: 600px; }
    .btn, input, select { font-size: 1.1rem; min-height: 44px; }
    .mobile-hidden { display: none !important; }
    .desktop-hidden { display: block !important; }
    .login-container { align-items: flex-start; padding-top: 5rem; }
    .login-card { width: 90%; max-width: 350px; }

    /* Specific dashboard adjustments for mobile */
    #dashboard.hidden {
        display: none;
    }
    .content-section.hidden {
        display: none;
    }
    .sidebar.open { /* When sidebar is open */
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    .main-container.shifted { /* If main content needs to shift - this class might be used by JS */
        margin-left: 250px; /* Adjust based on sidebar width */
    }
}

/* New Styles for Audit Log */
.audit-entry.audit-create { border-left: 4px solid #27ae60; }
.audit-entry.audit-update { border-left: 4px solid #3498db; }
.audit-entry.audit-delete { border-left: 4px solid #e74c3c; }
.audit-entry.audit-login { border-left: 4px solid #f39c12; }
.audit-entry.audit-logout { border-left: 4px solid #95a5a6; }

.action-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 0.25em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}
.action-badge.create { background-color: #d4edda; color: #155724; }
.action-badge.update { background-color: #d1ecf1; color: #0c5460; }
.action-badge.delete { background-color: #f8d7da; color: #721c24; }
.action-badge.login { background-color: var(--card-bg, #fff3cd); color: var(--text-primary, #856404); }
.action-badge.logout { background-color: #e2e3e5; color: #383d41; }

.audit-log-table {
    max-height: 500px;
    overflow-y: auto;
}

.audit-log-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.audit-log-header h3 {
    margin: 0;
    color: var(--text-primary);
}
.audit-log-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.audit-log-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.backup-section {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}
.backup-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.backup-schedule-info .schedule-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.backup-schedule-info .schedule-item i {
    color: var(--status-success);
}
.backup-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.backup-contents-list {
    list-style: none;
    padding-left: 0;
}
.backup-contents-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.backup-contents-list li i {
    color: var(--accent-color);
}
.modal-lg {
    max-width: 800px;
}
.form-select {
    background-color: var(--input-bg);
    color: var(--text-primary);
}
.form-select option {
    background-color: var(--input-bg);
    color: var(--text-primary);
}

/* Member Portal Sidebar and Dashboard Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 250px;
    height: calc(100vh - 70px);
    background: #222;
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: left 0.3s;
    overflow-y: auto;
}
.sidebar .nav-item {
    padding: 1rem 2rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1.1rem;
    transition: background 0.2s;
}
.sidebar .nav-item.active,
.sidebar .nav-item:hover {
    background: var(--accent-color, #ff4444);
    color: var(--text-white, #fff);
}
.main-container {
    margin-left: 250px;
    padding: 2rem;
    transition: margin-left 0.3s, padding-top 0.3s;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    padding: 1rem 2rem;
    color: #fff;
}
.btn, button {
    background: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5em 1.2em;
    cursor: pointer;
    font-size: 1rem;
    margin: 0.2em 0;
    transition: background 0.2s;
}
.btn:hover, button:hover {
    background: #666;
}
.announcement-item, .panel-section {
    background: #232323;
    margin: 0.5em 0;
    padding: 1em;
    border-radius: 6px;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.announcement-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.announcement-date {
    color: var(--text-secondary, #b0b0b0);
    font-size: 0.9rem;
}

.equipment-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.equipment-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #2a2a2a;
    border-radius: 4px;
}

.category-tab {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-tab:hover {
    background: #444;
    color: #fff;
}

.category-tab.active {
    background: var(--primary-color, #007bff);
    color: #fff;
    border-color: var(--primary-color, #007bff);
}

.equipment-tab {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.equipment-tab:hover {
    background: #444;
    color: #fff;
}

.equipment-tab.active {
    background: var(--primary-color, #007bff);
    color: #fff;
    border-color: var(--primary-color, #007bff);
}

.equipment-tab-content {
    min-height: 200px;
}

/* Drug Tracker Tabs */
.drug-tracker-tabs {
    margin-bottom: 2rem;
}

.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 0.75rem 1.5rem;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    background: #444;
    color: #fff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-color, #007bff);
    color: #fff;
    border-color: var(--primary-color, #007bff);
    border-bottom: 1px solid var(--card-bg, #232323);
    margin-bottom: -1px;
    z-index: 2;
}

.tab-btn i {
    font-size: 0.9rem;
}

.tab-content {
    background: var(--card-bg, #232323);
    border: 1px solid #444;
    border-radius: 0 6px 6px 6px;
    padding: 1.5rem;
    min-height: 400px;
}

.tab-panel {
    display: none !important;
}

.tab-panel.active {
    display: block !important;
}

/* Responsive design for drug tracker tabs */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tab-btn {
        border-radius: 6px;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .tab-btn.active {
        margin-bottom: 0;
        border-bottom: 1px solid #555;
    }
    
    .tab-content {
        border-radius: 6px;
        border-top: 1px solid #444;
    }
}

/* Import Drugs Tabs */
.import-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.import-tab-btn {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 0.75rem 1.5rem;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.import-tab-btn:hover {
    background: #444;
    color: #fff;
    transform: translateY(-2px);
}

.import-tab-btn.active {
    background: var(--primary-color, #007bff);
    color: #fff;
    border-color: var(--primary-color, #007bff);
    border-bottom: 1px solid var(--card-bg, #232323);
    margin-bottom: -1px;
    z-index: 2;
}

.import-tab-btn i {
    font-size: 0.9rem;
}

.import-tab-panel {
    display: none;
    padding: 1.5rem 0;
    min-height: 200px;
}

.import-tab-panel.active {
    display: block;
}

/* Import Options Container */
.import-options {
    margin-top: 1rem;
}

/* Manual Entry Styles */
.manual-entry-container {
    max-height: 400px;
    overflow-y: auto;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #444;
}

.entry-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.manual-drugs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.manual-drug-entry {
    background: var(--card-bg, #232323);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.manual-drug-entry .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.manual-drug-entry .form-row:last-child {
    margin-bottom: 0;
}

.manual-drug-entry .remove-entry {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.manual-drug-entry .remove-entry:hover {
    background: #c82333;
}

/* Template Download Styles */
.template-info {
    text-align: center;
    padding: 2rem;
}

.template-info h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.template-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.template-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* File Preview Styles */
.file-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card-bg, #232323);
    border: 1px solid #444;
    border-radius: 8px;
}

.file-preview h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.preview-table-container {
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.preview-table th,
.preview-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #444;
}

.preview-table th {
    background: #333;
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.preview-table td {
    color: var(--text-secondary);
}

/* Responsive design for import tabs */
@media (max-width: 768px) {
    .import-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .import-tab-btn {
        border-radius: 6px;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .import-tab-btn.active {
        margin-bottom: 0;
        border-bottom: 1px solid #555;
    }
    
    .manual-drug-entry .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .template-actions {
        flex-direction: column;
        align-items: center;
    }
}

.unit-item {
    background: #232323;
    margin: 0.5em 0;
    padding: 1em;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color, #007bff);
}

.unit-item div {
    margin: 0.25em 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}
/* --- Member Portal Schedule Section Styles --- */
.schedule-section {
    background: var(--card-bg, #232323);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px var(--shadow, rgba(0,0,0,0.2));
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.schedule-title {
    font-size: 1.5rem;
    color: var(--accent-color, #ff4444);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.date-nav {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.date-btn {
    background: var(--accent-color, #ff4444);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}
.date-btn:hover {
    background: var(--accent-hover, #ff6666);
}

.current-date {
    font-weight: bold;
    color: var(--text-primary, #fff);
    font-size: 1.1rem;
    margin: 0 0.5em;
}

.schedule-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.battalion-section {
    background: var(--bg-secondary, #2a2a2a);
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 300px;
    flex: 1;
    box-shadow: 0 1px 4px var(--shadow, rgba(0,0,0,0.1));
}

.battalion-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color, #ff4444);
    margin-bottom: 1em;
}

.unit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #222;
    color: #fff;
    padding: 0.7em 1em;
    border-radius: 6px;
    margin-bottom: 0.5em;
    font-size: 1.05rem;
    box-shadow: 0 1px 3px var(--shadow, rgba(0,0,0,0.08));
}

.unit-number {
    font-weight: bold;
    margin-right: 1em;
}

.unit-status {
    padding: 0.2em 0.8em;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
}
.unit-status.status-available {
    background: #28a745;
    color: #fff;
}
.unit-status.status-oos {
    background: #dc3545;
    color: #fff;
}
.unit-status.status-training {
    background: #ffc107;
    color: #222;
}
.unit-status.status-unknown {
    background: #888;
    color: #fff;
}

.no-units-message, .loading-message, .error-message {
    color: var(--text-secondary, #b0b0b0);
    font-style: italic;
    margin: 1em 0;
    text-align: center;
}

/* --- Member Portal Layout Enhancements --- */
body, .main-container {
    padding-top: 70px; /* For fixed header */
}
.main-container {
    margin-left: 250px; /* For fixed sidebar */
    transition: margin-left 0.3s, padding-top 0.3s;
}
@media (max-width: 1024px) {
    .main-container {
        margin-left: 80px;
    }
    .sidebar {
        width: 80px;
    }
    .sidebar .nav-item span {
        display: none;
    }
    .sidebar .nav-item i {
        margin-right: 0;
        text-align: center;
    }
    .content-area {
        padding: 1.5rem;
    }
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-left {
        flex-direction: row;
        min-width: 0;
        max-width: 100%;
        gap: 1rem;
        flex-wrap: wrap;
    }
    .left-panel {
        flex: 1;
        min-width: 280px;
    }
}
@media (max-width: 768px) {
    .main-container {
        margin-left: 0;
        padding-top: 70px;
    }
    .sidebar {
        left: -250px;
        width: 250px;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    .sidebar .nav-item span {
        display: inline;
    }
    .sidebar .nav-item i {
        margin-right: 0.5rem;
    }
    .content-area {
        padding: 1rem;
    }
    .hamburger {
        display: block !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1100;
    }
    .header {
        padding-left: 5rem;
    }
    .data-table-container {
        overflow-x: auto;
        width: 100%;
    }
    .data-table {
        min-width: 600px;
    }
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-left {
        flex-direction: row;
        min-width: 0;
        max-width: 100%;
        gap: 1rem;
        flex-wrap: wrap;
    }
    .left-panel {
        flex: 1;
        min-width: 300px;
    }
}
.content-section, .schedule-section, .panel-section {
    background: var(--card-bg, #232323);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow, rgba(0,0,0,0.2));
    padding: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}
.sidebar .nav-item {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* --- Tracking, Equipment, Apparatus Table Card Styles --- */
.tracking-section, .equipment-section, .apparatus-section {
    background: var(--card-bg, #232323);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow, rgba(0,0,0,0.2));
    padding: 2rem;
    margin-bottom: 2rem;
}
.tracking-section table,
.equipment-section table,
.apparatus-section table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-size: 1rem;
}
.tracking-section th,
.tracking-section td,
.equipment-section th,
.equipment-section td,
.apparatus-section th,
.apparatus-section td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid var(--border, #404040);
}
.tracking-section th {
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}
.tracking-section tr:last-child td {
    border-bottom: none;
}
.tracking-section tr {
    transition: background 0.2s;
}
.tracking-section tr:hover {
    background: var(--bg-secondary, #292929);
}
.status-available {
    background: #28a745;
    color: #fff;
    border-radius: 8px;
    padding: 0.2em 0.8em;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-block;
}
.status-oos, .status-waiting-repair, .status-pm {
    background: #dc3545;
    color: #fff;
    border-radius: 8px;
    padding: 0.2em 0.8em;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-block;
}
.status-in-use {
    background: #ffc107;
    color: #222;
    border-radius: 8px;
    padding: 0.2em 0.8em;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-block;
}
.oos-flag {
    color: #dc3545;
    font-size: 1.2em;
    margin-right: 0.5em;
    vertical-align: middle;
}
@media (max-width: 900px) {
    .tracking-section table,
    .equipment-section table,
    .apparatus-section table {
        font-size: 0.95rem;
    }
    .tracking-section th, .tracking-section td {
        padding: 0.5em 0.5em;
    }
    .main-container {
        margin-left: 60px;
    }
    .sidebar {
        width: 60px;
    }
    .content-area {
        padding: 1rem;
    }
    .dashboard-left {
        flex-direction: column;
        min-width: 0;
        max-width: 100%;
        gap: 1rem;
    }
    .left-panel {
        flex: none;
        min-width: 0;
        width: 100%;
    }
}

.equipment-tabs {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}
.equipment-list {
    padding: 0.5rem 1rem 1rem 1rem;
}
.equipment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #232323;
    border-radius: 6px;
    margin-bottom: 0.5em;
    padding: 0.7em 1em;
    font-size: 1.05rem;
    box-shadow: 0 1px 3px var(--shadow, rgba(0,0,0,0.08));
}

/* Responsive Navbar Improvements */
@media (max-width: 1100px) {
  .nav-menu {
    gap: 1.2rem;
  }
  .nav-link {
    font-size: 1rem;
  }
  .member-login {
    font-size: 1rem;
    padding: 12px 18px;
  }
}
@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    padding: 0 10px;
  }
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .nav-link {
    font-size: 0.98rem;
    padding: 0.5em 0.7em;
  }
  .member-login {
    font-size: 1rem;
    padding: 10px 16px;
    margin-left: 0;
    margin-top: 0.5rem;
    align-self: center;
  }
}
@media (max-width: 700px) {
  .navbar {
    padding: 0.5rem 0;
  }
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    padding: 0 4px;
  }
  .nav-logo {
    justify-content: center;
    font-size: 1.2rem;
  }
  .nav-menu {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .nav-link {
    font-size: 1rem;
    padding: 0.7em 0.5em;
    width: 100%;
    text-align: center;
  }
  .member-login {
    width: 90%;
    max-width: 320px;
    margin: 0.7rem auto 0 auto;
    display: flex;
    justify-content: center;
    font-size: 1.1rem;
    padding: 14px 0;
    border-radius: 18px;
  }
}
@media (max-width: 500px) {
  .nav-logo {
    font-size: 1rem;
  }
  .nav-link {
    font-size: 0.95rem;
    padding: 0.6em 0.3em;
  }
  .member-login {
    font-size: 1rem;
    padding: 12px 0;
    border-radius: 15px;
  }
}
/* Hamburger menu for mobile (if not present) */
.nav-toggle {
  display: flex;
  align-items: center;
  height: 48px;
  box-sizing: border-box;
}
.nav-toggle .bar {
  width: 24px;
  height: 3px;
  background: var(--text-white, #fff);
  margin: 3px 0;
  border-radius: 2px;
  transition: all 0.3s;
}
@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
  }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-dark, #181818);
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 1001;
    padding-bottom: 1rem;
    box-shadow: 0 2px 10px var(--shadow, rgba(0,0,0,0.2));
  }
}

/* Hide hamburger menu on desktop */
.nav-toggle {
  display: none;
}
@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }
}

.member-login {
  min-height: 56px;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}
@media (max-width: 700px) {
  .member-login {
    min-height: 48px;
    padding-top: 0.7em;
    padding-bottom: 0.7em;
    font-size: 1.15rem;
  }
}

/* Center login screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary, #1a1a1a);
    padding: 2rem 1rem;
}

.login-card {
    background: var(--card-bg, #232323);
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    font-size: 2.5rem;
    color: var(--accent-color, #ff4444);
    margin-bottom: 1rem;
}

.login-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #fff);
    text-align: center;
}

.form-group {
    width: 100%;
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-secondary, #b0b0b0);
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--input-border, #555);
    background: var(--input-bg, #333);
    color: var(--text-primary, #fff);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    transition: border 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--accent-color, #ff4444);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,68,68,0.15);
}

.login-btn {
    width: 100%;
    padding: 0.9rem 0;
    font-size: 1.1rem;
    background: var(--accent-color, #ff4444);
    color: #fff;
    border: none;
    border-radius: 6px;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover, .login-btn:focus {
    background: var(--accent-hover, #ff6666);
}

.g_id_signin {
    margin-top: 1.2rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Toast Notification Styles - Centered and Overlay */
.toast-notification,
.toast-error,
.toast-success,
.toast-warning,
.toast-info {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
    width: fit-content;
    min-width: 320px;
    max-width: calc(100vw - 40px);
    z-index: 9999;
    background: rgba(30, 30, 30, 0.97);
    color: #fff;
    padding: 1.2em 2em;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 1.5px 8px rgba(0,0,0,0.10);
    display: flex;
    align-items: center;
    gap: 1.2em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Ensure toast stays within viewport */
    max-height: calc(100vh - 40px);
    overflow: hidden;
    /* Prevent overflow */
    box-sizing: border-box;
}

.toast-notification.toast-show,
.toast-error.toast-show,
.toast-success.toast-show,
.toast-warning.toast-show,
.toast-info.toast-show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.toast-notification.toast-hide,
.toast-error.toast-hide,
.toast-success.toast-hide,
.toast-warning.toast-hide,
.toast-info.toast-hide {
    opacity: 0;
    transform: translateY(-20px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 1em;
}
.toast-icon {
    font-size: 1.6em;
    flex-shrink: 0;
}
.toast-message {
    font-size: 1.1em;
    font-weight: 500;
    flex: 1;
}
.toast-acknowledge-btn, .toast-close-btn {
    background: var(--accent-color, #ff4444);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.4em 1.1em;
    font-size: 1em;
    cursor: pointer;
    margin-left: 1em;
    transition: background 0.2s;
}
.toast-acknowledge-btn:hover, .toast-close-btn:hover {
    background: var(--accent-hover, #ff6666);
}
/* Toast types */
.toast-error { background: rgba(180, 40, 40, 0.97); }
.toast-success { background: rgba(40, 180, 80, 0.97); }
.toast-warning { background: rgba(200, 140, 30, 0.97); color: var(--text-primary); }
.toast-info { background: rgba(30, 80, 180, 0.97); }

/* Light theme override */
body.light-theme .toast-notification {
    background: rgba(255,255,255,0.98);
    color: #222;
}
body.light-theme .toast-error { background: rgba(255, 80, 80, 0.98); color: #fff; }
body.light-theme .toast-success { background: rgba(80, 200, 120, 0.98); color: #fff; }
body.light-theme .toast-warning { background: rgba(255, 220, 100, 0.98); color: var(--text-primary); }
body.light-theme .toast-info { background: rgba(80, 120, 255, 0.98); color: #fff; }

/* Responsive toast positioning for mobile */
@media (max-width: 768px) {
    .toast-notification,
    .toast-error,
    .toast-success,
    .toast-warning,
    .toast-info {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
        width: calc(100vw - 20px);
        box-sizing: border-box;
    }
    
    .toast-notification.toast-show,
    .toast-error.toast-show,
    .toast-success.toast-show,
    .toast-warning.toast-show,
    .toast-info.toast-show {
        transform: none;
    }
    
    .toast-notification.toast-hide,
    .toast-error.toast-hide,
    .toast-success.toast-hide,
    .toast-warning.toast-hide,
    .toast-info.toast-hide {
        transform: translateY(-20px);
    }
}

/* Notification Bell */
#notification-bell {
    position: relative;
    cursor: pointer;
    margin-right: 1rem;
    padding: 0.5em;
    border-radius: 6px;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}

#notification-bell:hover {
    background: var(--bg-hover, #2a2a2a);
}

.bell-icon {
    font-size: 1.5rem;
    color: var(--text-primary, #fff);
    position: relative;
    display: inline-block;
}

#notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color, #ff4444);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Notification Dropdown */
.notification-dropdown {
    display: none;
    position: absolute;
    top: 2.2em;
    right: 0;
    min-width: 380px;
    max-width: 450px;
    background: var(--bg-secondary, #222);
    color: var(--text-primary, #fff);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    z-index: 2100;
    border: 1px solid var(--border, #333);
    overflow: hidden;
    max-height: 80vh;
    overflow-y: auto;
}

.notification-dropdown-header {
    padding: 1em 1.2em;
    font-weight: 600;
    border-bottom: 1px solid var(--border, #333);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary, #1a1a1a);
}

.notification-action-btn {
    background: none;
    border: none;
    color: var(--accent-color, #ff4444);
    cursor: pointer;
    padding: 0.3em 0.6em;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.notification-action-btn:hover {
    background: rgba(255, 68, 68, 0.1);
}

.notification-dropdown-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-dropdown-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1em 1.2em;
    border-bottom: 1px solid var(--border, #333);
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-hover, #2a2a2a);
}

.notification-item.unread {
    background: rgba(255, 68, 68, 0.05);
    border-left: 3px solid var(--accent-color, #ff4444);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.3em;
    word-wrap: break-word;
}

.notification-meta {
    display: flex;
    gap: 1em;
    font-size: 0.8rem;
    color: var(--text-secondary, #aaa);
}

.notification-time {
    color: var(--text-secondary, #aaa);
}

.notification-type {
    background: var(--accent-color, #ff4444);
    color: white;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.notification-delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #aaa);
    cursor: pointer;
    padding: 0.3em;
    border-radius: 4px;
    margin-left: 0.5em;
    transition: all 0.2s;
}

.notification-delete-btn:hover {
    color: var(--accent-color, #ff4444);
    background: rgba(255, 68, 68, 0.1);
}

.notification-dropdown-footer {
    padding: 0.8em 1.2em;
    border-top: 1px solid var(--border, #333);
    text-align: center;
    background: var(--bg-tertiary, #1a1a1a);
}

.notification-dropdown-footer a {
    color: var(--accent-color, #ff4444);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

.notification-empty {
    padding: 2em 1.2em;
    color: var(--text-secondary, #aaa);
    text-align: center;
    font-style: italic;
}

.notification-loading {
    padding: 2em 1.2em;
    color: var(--text-secondary, #aaa);
    text-align: center;
}

.notification-error {
    padding: 2em 1.2em;
    color: var(--accent-color, #ff4444);
    text-align: center;
}

.notification-error i {
    font-size: 3em;
    margin-bottom: 1rem;
}

.notification-error h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary, #fff);
}

.notification-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1em 1.2em;
    border-bottom: 1px solid var(--border, #333);
    transition: background 0.2s;
}

.notification-item .notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.notification-item .notification-details {
    flex: 1;
    min-width: 0;
}

.notification-item .notification-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85em;
    color: var(--text-secondary, #888);
}

.notification-type {
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.75em;
}

.notification-type.info { background: rgba(30, 80, 180, 0.2); color: #4a9eff; }
.notification-type.success { background: rgba(40, 180, 80, 0.2); color: #4caf50; }
.notification-type.warning { background: rgba(200, 140, 30, 0.2); color: #ff9800; }
.notification-type.error { background: rgba(180, 40, 40, 0.2); color: #f44336; }

/* Notification Modal */
.notification-modal-actions {
    display: flex;
    gap: 0.5em;
}

.notification-filters {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1em;
    border-bottom: 1px solid var(--border, #333);
    padding-bottom: 1em;
}

.notification-filter-btn {
    background: none;
    border: 1px solid var(--border, #333);
    color: var(--text-primary, #fff);
    padding: 0.5em 1em;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.notification-filter-btn:hover {
    background: var(--bg-hover, #2a2a2a);
}

.notification-filter-btn.active {
    background: var(--accent-color, #ff4444);
    border-color: var(--accent-color, #ff4444);
    color: white;
}

.notification-stats {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
    font-size: 0.9rem;
    color: var(--text-secondary, #aaa);
}

.notification-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notification-list .notification-item {
    padding: 1em;
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    margin-bottom: 0.5em;
    background: var(--bg-secondary, #222);
}

.notification-list .notification-item:hover {
    background: var(--bg-hover, #2a2a2a);
}

.notification-list .notification-item.unread {
    border-left: 4px solid var(--accent-color, #ff4444);
    background: rgba(255, 68, 68, 0.05);
}

.notification-actions {
    display: flex;
    gap: 0.5em;
    margin-top: 0.5em;
}

/* Light theme overrides */
body.light-theme .notification-dropdown {
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

body.light-theme .notification-dropdown-header {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

body.light-theme .notification-item {
    border-bottom: 1px solid #eee;
}

body.light-theme .notification-item:hover {
    background: #f8f9fa;
}

body.light-theme .notification-item.unread {
    background: rgba(255, 68, 68, 0.05);
}

body.light-theme .notification-dropdown-footer {
    background: #f8f9fa;
    border-top: 1px solid #ddd;
}

body.light-theme .notification-filter-btn {
    border: 1px solid #ddd;
    color: #222;
}

body.light-theme .notification-filter-btn:hover {
    background: #f8f9fa;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .notification-dropdown {
        min-width: 300px;
        max-width: 350px;
        right: -50px;
    }
    
    .notification-modal-actions {
        flex-direction: column;
        gap: 0.3em;
    }
    
    .notification-filters {
        flex-wrap: wrap;
    }
    
    .notification-stats {
        flex-direction: column;
        gap: 0.3em;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 1100 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }
    
    /* Hide hamburger on login screen */
    #login-screen:not(.hidden) ~ .hamburger,
    body:has(#login-screen:not(.hidden)) .hamburger {
        display: none !important;
    }
    
    .sidebar {
        position: fixed !important;
        left: -250px !important;
        top: 0 !important;
        width: 250px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transition: left 0.3s ease !important;
        background: var(--sidebar-bg, #222) !important;
    }
    
    .sidebar.open {
        left: 0 !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5) !important;
    }
    
    .main-container {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        padding-top: 70px !important;
    }
    
    .content-section,
    .content-area,
    .dashboard-layout,
    .dashboard-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }
    
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    /* Ensure all content fills screen */
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    #dashboard {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure all cards and containers fill width */
    .card,
    .schedule-card,
    .panel-section,
    .content-card,
    .dashboard-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Fix any schedule or dashboard sections */
    .schedule-section,
    .dashboard-section,
    .section-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }
    
    /* Remove any fixed widths that might constrain content */
    .schedule-grid,
    .dashboard-grid,
    .stats-grid {
        width: 100% !important;
        max-width: 100% !important;
    }
}
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border, #444);
    margin-bottom: 1rem;
    gap: 0.5rem;
}
.modal-tab {
    padding: 0.5em 1.2em;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary, #fff);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s, color 0.2s;
}
.modal-tab.active,
.modal-tab:focus {
    border-bottom: 2px solid var(--accent-color, #ff4444);
    color: var(--accent-color, #ff4444);
    background: none;
}
.equipment-tabs {
    display: flex;
    border-bottom: 1px solid var(--border, #444);
    margin-bottom: 1rem;
    gap: 0.5rem;
}
.equipment-tab {
    padding: 0.5em 1.2em;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary, #0f0f0fd0);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s, color 0.2s;
}
.equipment-tab.active,
.equipment-tab:focus {
    border-bottom: 2px solid var(--accent-color, #ff4444);
    color: var(--accent-color, #ff4444);
    background: none;
}

#units-equipment {
  margin-top: 20px;
  padding: 10px;
}

.unit-item {
  border: 1px solid #ccc;
  margin-bottom: 12px;
  padding: 18px 24px;
  border-radius: 6px;
  background: #050505;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.5em 2em;
}
.unit-item div {
  margin-bottom: 0;
  min-width: 180px;
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .unit-item {
    flex-direction: column;
    gap: 0.5em;
    padding: 12px;
  }
  .unit-item div {
    min-width: 0;
    white-space: normal;
  }
}

.main-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  margin-left: 250px; /* Account for sidebar width */
  transition: margin-left 0.3s ease;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 70px;
  width: 250px;
  height: calc(100vh - 70px);
  background: #222;
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.content-area {
  flex: 1 1 0%;
  min-width: 0;
  padding: 2rem;
  box-sizing: border-box;
  display: block;
  flex-direction: column;
  width: 100%;
}

.content-section {
  display: block;
  width: 100%;
  min-height: 400px;
  margin-bottom: 2rem;
  background: transparent;
  overflow-x: auto;
}

.dashboard-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.dashboard-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 320px;
  max-width: 350px;
  flex-shrink: 0;
}

.dashboard-main {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

@media (max-width: 1200px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .dashboard-left {
    flex-direction: row;
    min-width: 0;
    max-width: 100%;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .left-panel {
    flex: 1;
    min-width: 300px;
  }
}

html, body,
.main-container,
.content-area,
.dashboard-layout,
.dashboard-main,
.content-section {
  width: 98%;
  max-width: 98%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
}

/* Remove/override problematic widths */
.content-section,
.dashboard-main,
.dashboard-layout,
.main-container,
.content-area {
  width: 98% !important;
  max-width: 98% !important;
  min-width: 0 !important;
}

/* Remove min-width and max-width on main containers */
body, .main-container, .content-area, .dashboard-layout, .dashboard-main, .content-section {
  min-width: 0 !important;
  max-width: 96% !important;
}

/* Responsive tables and modals */
.data-table, table {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: auto;
  overflow-x: auto;
}

.dashboard-modal .modal-content {
  max-width: 95vw;
  width: 98%;
  box-sizing: border-box;
}

/* Remove/override any fixed max-widths on main containers */
@media (min-width: 0px) {
  .main-container, .content-area, .dashboard-layout, .dashboard-main, .content-section {
    max-width: 96% !important;
  }
}

/* Remove/override .data-table { min-width: 700px; } and table { min-width: 600px; } */
.data-table, table {
  min-width: 0 !important;
}

.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
}

.data-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  overflow-x: auto;
  min-width: 0;
}

.dashboard-modal .modal-content {
  max-width: 98vw;
  box-sizing: border-box;
}

/* Responsive table container: always wrap wide tables in this for horizontal scroll on small screens */
.data-table-container {
  overflow-x: auto;
  width: 98%;
}

/* Remove/override problematic min-width and max-width on tables and containers */
.data-table, table {
  min-width: 0 !important;
  max-width: 98% !important;
  width: 98%;
  table-layout: auto;
}

html, body,
.main-container,
.content-area,
.dashboard-layout,
.dashboard-main,
.content-section {
  width: 98%;
  max-width: 98%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
}

/* Remove/override min-width and max-width in media queries */
@media (max-width: 1024px), (max-width: 900px), (max-width: 768px), (max-width: 700px), (max-width: 500px) {
  .data-table, table {
    min-width: 0 !important;
    max-width: 98% !important;
    width: 100% !important;
  }
}

/* EMS Management Styles */
.ems-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ems-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ems-tab {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg, #242424);
    border: 1px solid var(--border, #404040);
    color: var(--text-primary, #e0e0e0);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.ems-tab:hover {
    background: var(--accent-color, #ff4444);
    color: white;
    border-color: var(--accent-color, #ff4444);
}

.ems-tab.active {
    background: var(--accent-color, #ff4444);
    color: white;
    border-color: var(--accent-color, #ff4444);
}

/* Role and Group Grids */
.ems-roles-grid,
.ems-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.ems-role-section,
.ems-group-section {
    background: var(--card-bg, #242424);
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.3));
}

.ems-role-title,
.ems-group-title {
    color: var(--accent-color, #ff4444);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color, #ff4444);
}

.ems-role-items,
.ems-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ems-item-card {
    background: var(--bg-secondary, #2a2a2a);
    border: 1px solid var(--border, #404040);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.ems-item-card:hover {
    border-color: var(--accent-color, #ff4444);
    box-shadow: 0 2px 8px var(--shadow-hover, rgba(0, 0, 0, 0.4));
}

.ems-item-name {
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.ems-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #b0b0b0);
}

.ems-item-qty,
.ems-item-expiry,
.ems-item-location {
    background: var(--bg-primary, #1a1a1a);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border, #404040);
}

.ems-no-items {
    color: var(--text-muted, #888888);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    background: var(--bg-primary, #1a1a1a);
    border-radius: 6px;
    border: 1px dashed var(--border, #404040);
}

/* Specific Item Type Sections */
.ems-drugs-section,
.ems-drugboxes-section,
.ems-supplies-section,
.ems-narcotics-section {
    margin-top: 1rem;
}

.ems-drugs-grid,
.ems-drugboxes-grid,
.ems-supplies-grid,
.ems-narcotics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ems-drug-item,
.ems-drugbox-item,
.ems-supply-item,
.ems-narcotic-item {
    background: var(--card-bg, #242424);
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.3));
}

.ems-drug-item:hover,
.ems-drugbox-item:hover,
.ems-supply-item:hover,
.ems-narcotic-item:hover {
    border-color: var(--accent-color, #ff4444);
    box-shadow: 0 4px 12px var(--shadow-hover, rgba(0, 0, 0, 0.4));
    transform: translateY(-2px);
}

.ems-drug-name,
.ems-drugbox-name,
.ems-supply-name,
.ems-narcotic-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 0.75rem;
}

.ems-drug-details,
.ems-drugbox-details,
.ems-supply-details,
.ems-narcotic-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #b0b0b0);
}

.ems-drug-qty,
.ems-drug-expiry,
.ems-drug-lot,
.ems-drug-vial,
.ems-drugbox-status,
.ems-drugbox-notes,
.ems-supply-qty,
.ems-supply-location,
.ems-supply-notes,
.ems-narcotic-qty,
.ems-narcotic-expiry,
.ems-narcotic-lot,
.ems-narcotic-vial {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ems-drug-qty::before,
.ems-drugbox-status::before,
.ems-supply-qty::before,
.ems-narcotic-qty::before {
    content: "📦";
    font-size: 0.8rem;
}

.ems-drug-expiry::before,
.ems-narcotic-expiry::before {
    content: "📅";
    font-size: 0.8rem;
}

.ems-drug-lot::before,
.ems-narcotic-lot::before {
    content: "🏷️";
    font-size: 0.8rem;
}

.ems-drug-vial::before,
.ems-narcotic-vial::before {
    content: "💉";
    font-size: 0.8rem;
}

.ems-supply-location::before {
    content: "📍";
    font-size: 0.8rem;
}

.ems-supply-notes::before {
    content: "📝";
    font-size: 0.8rem;
}

.ems-drugbox-notes::before {
    content: "📋";
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ems-roles-grid,
    .ems-groups-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .ems-drugs-grid,
    .ems-drugboxes-grid,
    .ems-supplies-grid,
    .ems-narcotics-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .ems-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .ems-tab {
        text-align: center;
        padding: 1rem;
    }
    
    .ems-roles-grid,
    .ems-groups-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ems-drugs-grid,
    .ems-drugboxes-grid,
    .ems-supplies-grid,
    .ems-narcotics-grid {
        grid-template-columns: 1fr;
    }
    
    .ems-item-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ems-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ems-stats {
        grid-template-columns: 1fr;
    }
    
    .ems-role-section,
    .ems-group-section {
        padding: 1rem;
    }
    
    .ems-drug-item,
    .ems-drugbox-item,
    .ems-supply-item,
    .ems-narcotic-item {
        padding: 1rem;
    }
}

/* Admin View Styles */
.ems-all-section {
    margin-top: 1rem;
}

.ems-all-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.ems-category-section {
    background: var(--card-bg, #242424);
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.3));
}

.ems-category-title {
    color: var(--accent-color, #ff4444);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color, #ff4444);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ems-category-title::before {
    content: "👑";
    font-size: 1rem;
}

.ems-category-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ems-item-type {
    background: var(--accent-color, #ff4444);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ems-item-status {
    background: var(--bg-primary, #1a1a1a);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border, #404040);
    font-size: 0.8rem;
}

.ems-item-lot,
.ems-item-vial {
    background: var(--bg-primary, #1a1a1a);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border, #404040);
    font-size: 0.8rem;
}

/* Admin tab styling */
.ems-tab.admin-only {
    background: linear-gradient(135deg, var(--accent-color, #ff4444), #ff6666);
    color: white;
    border-color: var(--accent-color, #ff4444);
    font-weight: 600;
    position: relative;
}

.ems-tab.admin-only::before {
    content: "👑";
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.ems-tab.admin-only:hover {
    background: linear-gradient(135deg, #ff6666, var(--accent-color, #ff4444));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-hover, rgba(0, 0, 0, 0.4));
}

.ems-tab.admin-only.active {
    background: linear-gradient(135deg, var(--accent-color, #ff4444), #ff6666);
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.3));
}

/* Responsive design for admin view */
@media (max-width: 1024px) {
    .ems-all-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .ems-all-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ems-category-section {
        padding: 1rem;
    }
    
    .ems-category-title {
        font-size: 1.1rem;
    }
}

/* Inventory Management Styles */
.inventory-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.inventory-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-secondary);
}

.inventory-tab:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.inventory-tab.active {
    background: var(--accent-color);
    color: var(--text-white);
    border-color: var(--accent-color);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.inventory-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.inventory-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
    border-color: var(--accent-color);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.item-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.item-category {
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: var(--text-white);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.item-details {
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.detail-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-row .value {
    color: var(--text-primary);
    font-weight: 600;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.item-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Inventory Filters */
.inventory-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.inventory-filters .form-input {
    min-width: 200px;
}

/* Inventory Cards */
.inventory-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
    border-color: var(--accent-color);
}

.inventory-info {
    flex: 1;
}

.inventory-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.inventory-info p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.inventory-actions {
    display: flex;
    gap: 0.5rem;
}

.inventory-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Drug Inventory Specific */
.drug-item {
    border-left: 4px solid #e74c3c;
}

.ems-item {
    border-left: 4px solid #3498db;
}

.equipment-item {
    border-left: 4px solid #f39c12;
}

@media (max-width: 768px) {
    .inventory-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .inventory-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .inventory-grid {
        grid-template-columns: 1fr;
    }
    
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    
    .inventory-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inventory-filters .form-input {
        min-width: auto;
    }
}

/* Training Management Styles */
.training-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.training-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.training-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.training-tab.active {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

.training-panel {
    display: none;
    padding: 20px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.training-panel.active {
    display: block;
}

/* Online Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.course-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.course-card.completed {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #fff 100%);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.course-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
}

.course-category {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
}

.completion-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
}

.course-content p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.course-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.material-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.material-link:hover {
    background: #e9ecef;
    color: #212529;
    text-decoration: none;
}

.material-link i {
    margin-right: 6px;
    font-size: 0.8rem;
}

.course-details {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.course-details span {
    display: flex;
    align-items: center;
}

.course-details i {
    margin-right: 5px;
    color: #007bff;
}

.course-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.completion-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.completion-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Training Tables */
.trainings-table,
.completions-table,
.certifications-table {
    overflow-x: auto;
}

.trainings-table table,
.completions-table table,
.certifications-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.trainings-table th,
.completions-table th,
.certifications-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.trainings-table td,
.completions-table td,
.certifications-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.trainings-table tr:hover,
.completions-table tr:hover,
.certifications-table tr:hover {
    background: #f8f9fa;
}

/* Certification Status */
.certifications-table tr.expired {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
}

.certifications-table tr.expiring-soon {
    background: #fffbf0;
    border-left: 4px solid #ffc107;
}

/* Upload Section Styles */
.upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.upload-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
}

.upload-group {
    margin-bottom: 15px;
}

.upload-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.upload-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Form Row Layout */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Large Modal */
.large-modal .modal-content {
    max-width: 800px;
    width: 90%;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .training-tabs {
        flex-direction: column;
    }
    
    .training-tab {
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .course-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .course-category,
    .completion-badge {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .course-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .course-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .large-modal .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .training-panel {
        padding: 15px;
    }
    
    .course-card {
        padding: 15px;
    }
    
    .course-materials {
        flex-direction: column;
    }
    
    .material-link {
        justify-content: center;
    }
}

/* Events Management Styles */
.events-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.events-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.events-list h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.event-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.event-filters input {
    flex: 1;
    min-width: 150px;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.event-info {
    flex: 1;
}

.event-tickets {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.ticket-price {
    font-weight: bold;
    color: #28a745;
    margin-right: 10px;
}

.ticket-available {
    color: #007bff;
    margin-right: 10px;
}

.seating-chart {
    color: #6c757d;
}

.seating-chart {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.seat {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8em;
    border-radius: 4px;
}

.seat.available {
    background: #d4edda;
    color: #155724;
}

.seat.taken {
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

.seat.selected {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.ticket-sales-list {
    max-height: 300px;
    overflow-y: auto;
}

.ticket-sale-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
}

.sale-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-info p {
    margin: 5px 0;
}

/* Payment Methods for Events */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.payment-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.payment-option input[type="radio"]:checked + span {
    color: #007bff;
    font-weight: 600;
}

.payment-option span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.payment-option i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.payment-option input[type="radio"]:checked + span i {
    color: #007bff;
}

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

.event-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.event-date {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
}

.event-location {
    color: #495057;
    font-size: 0.9rem;
    text-align: center;
}

.event-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.event-stats {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-stats h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Event Details Modal */
.event-details-modal .modal-content {
    max-width: 700px;
}

.event-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.event-detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.event-detail-item h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1rem;
}

/* Seating Chart */
.seating-chart {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 15px 0;
}

.seat-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: #28a745;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.seat-btn.taken {
    background: #dc3545;
    cursor: not-allowed;
}

.seat-btn.taken:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .event-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .event-actions {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .event-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .event-filters input {
        width: 100%;
    }
    
    .seating-chart {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .seat-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .events-list,
    .event-stats {
        padding: 15px;
    }
    
    .event-item {
        padding: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .seating-chart {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .seat-btn {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
}

/* Photo Gallery Management Styles */
.photo-gallery-container {
    margin-top: 20px;
}

/* Albums Section */
.albums-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.albums-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.albums-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.albums-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.album-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.album-card.active {
    border: 2px solid #4f8ef7;
    box-shadow: 0 10px 28px rgba(79, 142, 247, 0.25);
}

.album-cover {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.album-placeholder {
    font-size: 3rem;
    color: #adb5bd;
    text-align: center;
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card:hover .album-overlay {
    opacity: 1;
}

.album-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.album-delete-btn {
    background: #d64045;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.album-delete-btn i {
    font-size: 0.85rem;
}

.album-delete-btn:hover {
    background: #a82327;
    transform: translateY(-1px);
}

.album-delete-btn:active {
    transform: translateY(0);
}

.album-info {
    padding: 20px;
}

.album-title {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.album-description {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #adb5bd;
}

.album-date {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
}

.album-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* No Albums State */
.no-albums {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-albums-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-albums h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.3rem;
}

.no-albums p {
    margin: 0 0 25px 0;
    font-size: 1rem;
}

/* Photos Section */
.photos-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.photos-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.back-btn {
    background: #007bff;
    border: 1px solid #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    margin-bottom: 15px;
}

.back-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.back-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.photos-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    flex: 1;
}

.photos-stats {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Photos Toolbar */
.photos-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.view-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.photo-actions {
    display: flex;
    gap: 10px;
}

/* Photos Container */
.photos-container {
    min-height: 400px;
}

/* Photos Grid Layout */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Photos Masonry Layout */
.photos-masonry {
    columns: 4;
    column-gap: 20px;
}

.photos-masonry .photo-card {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Photos List Layout */
.photos-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.photos-list .photo-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.photos-list .photo-image {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
}

.photos-list .photo-info {
    flex: 1;
}

/* Photo Cards */
.photo-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e9ecef);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.photo-card .photo-image {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.photo-card .photo-image img {
    display: block;
    width: 100%;
    height: auto;
}

.photo-card .photo-info {
    padding: 15px;
    flex: 1;
}

.photo-card .photo-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.photo-card .photo-description {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
    line-height: 1.4;
}

.photo-card .photo-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted, #999);
}

.photo-card .photo-actions {
    padding: 10px 15px;
    border-top: 1px solid var(--border, #e9ecef);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.photo-select-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.photo-select {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.photo-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.photo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-image img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-actions {
    display: flex;
    gap: 8px;
}

.photo-info {
    padding: 15px;
}

.photo-caption {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-date {
    color: #6c757d;
    font-size: 0.8rem;
}

/* No Photos State */
.no-photos {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-photos-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-photos h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.3rem;
}

.no-photos p {
    margin: 0 0 25px 0;
    font-size: 1rem;
}

/* Photo Viewer Modal */
.photo-viewer-modal .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.photo-viewer {
    background: #000;
    color: white;
}

.photo-viewer .modal-header {
    background: rgba(0,0,0,0.8);
    border-bottom: 1px solid #333;
}

.photo-viewer .modal-header h3 {
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.photo-viewer-image {
    text-align: center;
    padding: 20px;
}

.photo-viewer-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.photo-viewer-info {
    background: rgba(0,0,0,0.8);
    padding: 20px;
    border-top: 1px solid #333;
}

.photo-viewer-info p {
    margin: 5px 0;
    color: #ccc;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .photos-masonry {
        columns: 3;
    }
}

@media (max-width: 992px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .photos-masonry {
        columns: 2;
    }
}

@media (max-width: 768px) {
    .albums-section,
    .photos-section {
        padding: 20px;
    }
    
    .albums-header,
    .photos-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .back-btn {
        align-self: flex-start;
        width: auto;
        min-width: 140px;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .photos-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .view-controls {
        justify-content: center;
    }
    
    .photo-actions {
        justify-content: center;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .photos-masonry {
        columns: 1;
    }
    
    .photos-list .photo-card {
        flex-direction: column;
        text-align: center;
    }
    
    .photos-list .photo-image {
        width: 100%;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .albums-section,
    .photos-section {
        padding: 15px;
    }
    
    .albums-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .album-card {
        margin: 0 auto;
        max-width: 300px;
    }
    
    .photo-card {
        margin: 0 auto;
        max-width: 300px;
    }
}

/* File Visibility Management Styles */
.file-visibility-admin {
    padding: 20px;
}

.category-badge, .visibility-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.category-badge.documents {
    background-color: #e3f2fd;
    color: #1976d2;
}

.category-badge.images {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.category-badge.videos {
    background-color: #fff3e0;
    color: #f57c00;
}

.category-badge.audio {
    background-color: #e8f5e8;
    color: #388e3c;
}

.category-badge.archives {
    background-color: #fce4ec;
    color: #c2185b;
}

.category-badge.other {
    background-color: #f5f5f5;
    color: #616161;
}

.visibility-badge.visible {
    background-color: #e8f5e8;
    color: #388e3c;
}

.visibility-badge.hidden {
    background-color: #ffebee;
    color: #d32f2f;
}

.file-visibility-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.file-visibility-header h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-visibility-header p {
    margin: 0;
    color: #6c757d;
    font-size: 1rem;
}

.file-visibility-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.visibility-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.visibility-filters .form-input {
    min-width: 150px;
}

.visibility-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.file-visibility-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.file-visibility-stats .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.file-visibility-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.file-visibility-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.file-visibility-list {
    min-height: 400px;
}

.file-visibility-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-visibility-table .data-table {
    width: 100%;
    border-collapse: collapse;
}

.file-visibility-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.file-visibility-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.file-row {
    transition: background-color 0.3s ease;
}

.file-row:hover {
    background-color: #f8f9fa;
}

.file-row.hidden {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.file-row.visible {
    opacity: 1;
    background-color: #fff;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-info i {
    font-size: 1.2rem;
    color: #6c757d;
    width: 20px;
    text-align: center;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
}

.file-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.file-size {
    color: #6c757d;
    font-size: 0.9rem;
}

.file-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.visibility-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.visibility-status.visible {
    background: #d4edda;
    color: #155724;
}

.visibility-status.hidden {
    background: #f8d7da;
    color: #721c24;
}

.file-actions {
    display: flex;
    gap: 5px;
}

.file-actions .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* File selection checkboxes */
.file-select {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

#select-all-files {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* No files state */
.no-files {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-files-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.no-files h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.5rem;
}

.no-files p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 1rem;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}

/* File preview modal */
.file-preview {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.file-preview p {
    margin: 10px 0;
    color: #495057;
}

/* Responsive design */
@media (max-width: 992px) {
    .file-visibility-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .visibility-filters {
        justify-content: center;
    }
    
    .visibility-actions {
        justify-content: center;
    }
    
    .file-visibility-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .file-visibility-admin {
        padding: 20px;
    }
    
    .file-visibility-table {
        overflow-x: auto;
    }
    
    .file-visibility-table .data-table {
        min-width: 600px;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 3px;
    }
    
    .visibility-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .visibility-filters .form-input {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .file-visibility-admin {
        padding: 15px;
    }
    
    .file-visibility-header h4 {
        font-size: 1.3rem;
    }
    
    .file-visibility-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .file-visibility-stats .stat-card {
        padding: 15px;
    }
    
    .file-visibility-stats .stat-number {
        font-size: 1.5rem;
    }
}

/* Hours Report Styles */
.hours-report-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.report-type-selector,
.date-selector,
.employee-selector {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-type-selector label,
.date-selector label,
.employee-selector label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.hours-report-summary {
    margin-bottom: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.summary-content {
    flex: 1;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.hours-report-content {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.report-table-container h3,
.yearly-chart-container h3,
.yearly-table-container h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.yearly-chart-container {
    margin-bottom: 30px;
}

.yearly-chart {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    align-items: end;
    justify-content: center;
}

.yearly-chart-bars {
    display: flex;
    align-items: end;
    gap: 15px;
    height: 250px;
    width: 100%;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 40px;
}

.bar-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    transition: height 0.3s ease;
}

.bar-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
}

.bar-value {
    font-size: 0.8rem;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

.yearly-table-container {
    margin-top: 20px;
}

/* Responsive design for hours report */
@media (max-width: 768px) {
    .hours-report-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .summary-value {
        font-size: 1.5rem;
    }
    
    .yearly-chart-bars {
        gap: 10px;
        height: 200px;
    }
    
    .chart-bar {
        min-width: 30px;
    }
    
    .bar-label,
    .bar-value {
        font-size: 0.7rem;
    }
}

/* Drug Tracker Modern Styles */
.drug-tracker-dashboard {
  margin-top: 30px;
}
.drug-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  padding: 18px 20px;
  gap: 18px;
}
.stat-icon {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.narcotic-stat .stat-icon { background: #f8d7da; color: #c82333; }
.als-stat .stat-icon { background: #e3f2fd; color: #1976d2; }
.bls-stat .stat-icon { background: #d4edda; color: #218838; }
.box-stat .stat-icon { background: #fff3cd; color: #856404; }
.stat-content .stat-number {
  font-size: 1.6rem;
  font-weight: 700;
}
.stat-content .stat-label {
  font-size: 1rem;
  color: #6c757d;
}

.drug-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}
.drug-category {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 20px 18px 18px 18px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.category-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-warning, .category-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  padding: 3px 10px;
  border-radius: 8px;
  margin-left: auto;
}
.category-warning {
  background: #f8d7da;
  color: #c82333;
  font-weight: 600;
}
.category-info {
  background: #e3f2fd;
  color: #1976d2;
}

.drug-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

/* Responsive column adjustments */
@media (max-width: 1600px) {
  .drug-list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 1200px) {
  .drug-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .drug-list {
    grid-template-columns: 1fr;
  }
}

.drug-card {
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #212529;
}

.drug-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.narcotic-drug { border-left: 5px solid #c82333; }
.als-drug { border-left: 5px solid #1976d2; }
.bls-drug { border-left: 5px solid #218838; }
.drug-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 70px;
  flex-shrink: 0;
}
.drug-id {
  font-weight: 700;
  font-size: 1.05rem;
  color: #495057;
}
.drug-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 2px;
  background: #e9ecef;
  color: #495057;
  white-space: nowrap;
}
.drug-status.active { background: #d4edda; color: #218838; }
.drug-status.oos { background: #f8d7da; color: #c82333; }
.drug-info {
  flex: 1;
  min-width: 0;
}
.drug-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drug-strength,
.drug-form,
.drug-location {
  margin: 0;
  font-size: 0.9rem;
  color: #495057;
}

.drug-location {
  margin-top: 4px;
}

.drug-expiry {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 4px;
}

.drug-expiry i {
  font-size: 0.9rem;
}

.drug-expiry.expiring-soon {
  color: #ff9800;
  font-weight: 600;
}

.drug-expiry.expiring-soon i {
  color: #ff9800;
}

.drug-expiry.expiring-critical {
  color: #f44336;
  font-weight: 700;
  animation: pulse 2s ease-in-out infinite;
}

.drug-expiry.expiring-critical i {
  color: #f44336;
}

.drug-expiry.expired {
  color: #d32f2f;
  font-weight: 700;
}

.drug-expiry.expired i {
  color: #d32f2f;
}

.drug-card.expiring-soon {
  border-left-width: 6px;
  background: #fff8e1;
}

.drug-card.expiring-critical {
  border-left-width: 6px;
  background: #ffebee;
}

.drug-card.expired {
  border-left-width: 6px;
  background: #ffcdd2;
  opacity: 0.8;
}

.drug-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Make drug cards more compact in narrow columns */
@media (max-width: 1200px) {
  .drug-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .drug-header {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .drug-info {
    width: 100%;
  }
  
  .drug-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Drug Boxes */
.drug-boxes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.drug-box-card {
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 16px 18px;
  min-width: 260px;
  max-width: 320px;
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 4px solid #666;
  transition: all 0.3s ease;
  color: #212529;
}

.drug-box-card.available {
  border-left-color: #28a745;
}

.drug-box-card.unavailable {
  border-left-color: #dc3545;
  opacity: 0.85;
}

/* Removed pointer-events: none to allow editing unavailable boxes */
.drug-box-card.unavailable .box-actions button:not([disabled]) {
  opacity: 1;
}

.box-availability {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-top: 8px;
}

.box-availability small {
  color: #6c757d;
  font-size: 0.8rem;
}

.box-seal {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 4px;
}

.box-expiry {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.box-expiry i {
  color: #17a2b8;
}

.box-expiry.expiring-soon {
  color: #ff9800;
  font-weight: 600;
}

.box-expiry.expiring-soon i {
  color: #ff9800;
}

.box-expiry.expiring-critical {
  color: #f44336;
  font-weight: 700;
  animation: pulse 2s ease-in-out infinite;
}

.box-expiry.expiring-critical i {
  color: #f44336;
}

.box-expiry.expired {
  color: #d32f2f;
  font-weight: 700;
  text-decoration: line-through;
}

.box-expiry.expired i {
  color: #d32f2f;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.warning-message {
  background: #fff3cd;
  color: #856404;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
}

.warning-message i {
  color: #ffc107;
  margin-top: 2px;
}

.info-message {
  background: #e3f2fd;
  color: #1976d2;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 0.9rem;
}

.info-message i {
  color: #1976d2;
  margin-right: 8px;
}

.info-message ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.info-message li {
  margin: 4px 0;
}
.box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.box-id {
  font-weight: 700;
  font-size: 1.1rem;
}
.box-type {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e3f2fd;
  color: #1976d2;
}
.box-type.narcotic { background: #f8d7da; color: #c82333; }
.box-type.als { background: #e3f2fd; color: #1976d2; }
.box-type.bls { background: #d4edda; color: #218838; }
.box-info h4 {
  margin: 0 0 2px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
}
.box-description, .box-location {
  margin: 0;
  font-size: 0.95rem;
  color: #6c757d;
}
.box-contents h5 {
  margin: 0 0 4px 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #495057;
}
.box-drugs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.box-drug-item {
  background: #fff3cd;
  color: #856404;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}
.no-drugs, .no-boxes, .no-transactions {
  color: #adb5bd;
  font-style: italic;
  padding: 10px 0;
}
.box-actions {
  display: flex;
  gap: 8px;
}

/* Recent Transactions */
.recent-transactions {
  margin-top: 40px;
}
.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.transaction-item {
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.transaction-icon {
  font-size: 1.3rem;
  color: #1976d2;
  width: 32px;
  text-align: center;
}
.transaction-info {
  flex: 1;
}
.transaction-drug {
  font-weight: 600;
  font-size: 1.05rem;
}
.transaction-details {
  font-size: 0.95rem;
  color: #6c757d;
}
.transaction-time {
  font-size: 0.9rem;
  color: #adb5bd;
}
.transaction-status {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e3f2fd;
  color: #1976d2;
}
.transaction-status.dispense { background: #d4edda; color: #218838; }
.transaction-status.waste { background: #f8d7da; color: #c82333; }
.transaction-status.transfer { background: #fff3cd; color: #856404; }
.transaction-status.audit { background: #e2e3e5; color: #383d41; }

/* Modal Enhancements */
.dashboard-modal .modal-content {
  max-width: 500px;
}
.security-warning {
  background: #f8d7da;
  color: #c82333;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.info-notice {
  background: #e3f2fd;
  color: #1976d2;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.verification-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-number {
  background: #1976d2;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-content h4 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
}
.step-content p {
  margin: 0 0 6px 0;
  font-size: 0.97rem;
}

@media (max-width: 900px) {
  .drug-categories {
    grid-template-columns: 1fr;
  }
  .drug-boxes-grid {
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .drug-stats-grid {
    grid-template-columns: 1fr;
  }
  .drug-category {
    padding: 12px 6px;
  }
  .drug-box-card {
    min-width: 100%;
    max-width: 100%;
  }
}

/* Enhanced Drug Tracker Styles */
.drug-tracker-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.drug-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.narcotic-stat .stat-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.als-stat .stat-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.bls-stat .stat-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.box-stat .stat-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.drug-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.drug-category {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.category-header h3 {
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-warning {
    background: #fff3cd;
    color: #856404;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-info {
    background: #d1ecf1;
    color: #0c5460;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Removed duplicate .drug-list definition - see main definition above around line 6996 */

.drug-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.drug-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.narcotic-drug {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5, #fef2f2);
}

.als-drug {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.bls-drug {
    border-left-color: #3498db;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.drug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.drug-id {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.drug-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.drug-status.active {
    background: #d4edda;
    color: #155724;
}

.drug-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.drug-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.drug-info p {
    margin: 0.25rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.drug-quantity {
    font-weight: bold;
    color: #27ae60 !important;
}

.drug-barcode, .drug-qr {
    font-family: monospace;
    background: #ecf0f1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.drug-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.drug-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.drug-box-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 2px solid #ecf0f1;
    transition: all 0.3s ease;
}

.drug-box-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.box-id {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
}

.box-type {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.box-type.narcotic {
    background: #f8d7da;
    color: #721c24;
}

.box-type.als {
    background: #fff3cd;
    color: #856404;
}

.box-type.bls {
    background: #d1ecf1;
    color: #0c5460;
}

.box-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.box-description, .box-location {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.box-contents h5 {
    margin: 1rem 0 0.5rem 0;
    color: #2c3e50;
}

.box-drugs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.box-drug-item {
    background: #ecf0f1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #2c3e50;
}

.box-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.recent-transactions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.recent-transactions h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.2s, box-shadow 0.2s;
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.transaction-item.dispense {
    border-left-color: #27ae60;
}

.transaction-item.waste {
    border-left-color: #e74c3c;
}

.transaction-item.restock {
    border-left-color: #f39c12;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.transaction-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-type.dispense {
    background: #d4edda;
    color: #155724;
}

.transaction-type.waste {
    background: #f8d7da;
    color: #721c24;
}

.transaction-type.restock {
    background: #fff3cd;
    color: #856404;
}

.transaction-date {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.transaction-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #495057;
    font-size: 0.9rem;
}

.transaction-drug {
    font-weight: 600;
    color: #2c3e50;
    flex: 1 1 100%;
    margin-bottom: 0.25rem;
}

.transaction-quantity {
    color: #6c757d;
    font-weight: 500;
}

.transaction-by {
    color: #6c757d;
    font-style: italic;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
}

.transaction-info {
    flex: 1;
}

.transaction-time {
    color: #95a5a6;
    font-size: 0.8rem;
}

.transaction-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.transaction-status.completed {
    background: #d4edda;
    color: #155724;
}

.transaction-status.pending {
    background: #fff3cd;
    color: #856404;
}

.no-transactions {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #f5c6cb;
}

/* Event Photo Upload Styles */
.photo-upload-container {
  margin-top: 10px;
}

.photo-upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9f9f9;
}

.photo-upload-area:hover {
  border-color: #007bff;
  background: #f0f8ff;
}

.photo-upload-area.drag-over {
  border-color: #007bff;
  background: #e3f2fd;
  transform: scale(1.02);
}

.photo-upload-area i {
  font-size: 2rem;
  color: #007bff;
  margin-bottom: 10px;
}

.photo-upload-area p {
  margin: 10px 0 5px 0;
  color: #333;
  font-weight: 500;
}

.photo-upload-area small {
  color: #666;
  font-size: 0.85rem;
}

.photos-preview {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.photos-preview h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1rem;
}

.photos-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.photo-preview-item {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
}

.photo-thumbnail {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.photo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-name {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-size {
  color: #666;
  font-size: 0.8rem;
}

.photo-preview-item .btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview-item .btn i {
  font-size: 0.8rem;
}

/* Witness Section Styles */
.witness-section {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.witness-section h4 {
    margin: 0 0 1rem 0;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Scanner Styles */
.scanner-options {
    margin-bottom: 2rem;
}

.scan-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

#scanner-viewport {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
}

#scanner-video {
    width: 100%;
    border-radius: 8px;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    width: 200px;
    height: 200px;
    border: 2px solid #3498db;
    border-radius: 8px;
    background: rgba(52, 152, 219, 0.1);
}

#scan-results {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.scanned-drug-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scanned-drug-card .drug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.drug-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.drug-category.narcotic {
    background: #f8d7da;
    color: #721c24;
}

.drug-category.als {
    background: #fff3cd;
    color: #856404;
}

.drug-category.bls {
    background: #d1ecf1;
    color: #0c5460;
}

/* Drug Info Display */
.drug-info-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.drug-info-display h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.drug-info-display p {
    margin: 0.25rem 0;
    color: #7f8c8d;
}

/* Security Modal Styles */
.security-modal .modal-content {
    max-width: 600px;
}

.verification-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.step-content p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

#signature-canvas {
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: crosshair;
}

/* Responsive Design */
@media (max-width: 768px) {
    .drug-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drug-categories {
        grid-template-columns: 1fr;
    }
    
    .drug-boxes-grid {
        grid-template-columns: 1fr;
    }
    
    .scan-buttons {
        flex-direction: column;
    }
    
    .verification-steps {
        gap: 1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
}

/* Loading and Empty States */
.loading, .no-drugs, .no-boxes, .no-transactions {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: #3498db;
}

/* Form Enhancements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Button Enhancements */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-warning {
    background: #f39c12;
    color: white;
    border: none;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #138496;
}

/* Drug Box Status Styles */
.drug-box-card.available {
    border-color: #27ae60;
}

.drug-box-card.checked_out {
    border-color: #f39c12;
}

.drug-box-card.resealed {
    border-color: #e74c3c;
}

.drug-box-card.transferred {
    border-color: #9b59b6;
}

.drug-box-card.restocking {
    border-color: #3498db;
}

.box-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.box-status.available {
    background: #d4edda;
    color: #155724;
}

.box-status.checked_out {
    background: #fff3cd;
    color: #856404;
}

.box-status.resealed {
    background: #f8d7da;
    color: #721c24;
}

.box-status.transferred {
    background: #e2d9f3;
    color: #4a235a;
}

.box-status.restocking {
    background: #d1ecf1;
    color: #0c5460;
}

.reseal-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.reseal-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #856404;
}

.reseal-info strong {
    color: #856404;
}

/* Reseal, Transfer, Restock Modal Styles */
.reseal-notice,
.transfer-notice,
.restock-notice {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0c5460;
}

.reseal-notice i,
.transfer-notice i,
.restock-notice i {
    color: #17a2b8;
    font-size: 1.2rem;
}

/* Button Enhancements */
.btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #218838;
}

/* Box Actions Enhancement */
.box-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.box-actions .btn {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

/* Responsive Box Actions */
@media (max-width: 768px) {
    .box-actions {
        flex-direction: column;
    }
    
    .box-actions .btn {
        flex: none;
        width: 100%;
    }
}

/* Unit Checks Styles */
.checks-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border, #444);
    padding-bottom: 1rem;
}

.check-tab {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg, #242424);
    border: 1px solid var(--border, #404040);
    color: var(--text-primary, #e0e0e0);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.check-tab:hover {
    background: var(--accent-color, #ff4444);
    color: white;
    border-color: var(--accent-color, #ff4444);
}

.check-tab.active {
    background: var(--accent-color, #ff4444);
    color: white;
    border-color: var(--accent-color, #ff4444);
}

.checks-content {
    min-height: 400px;
}

.check-panel {
    display: none;
    padding: 1rem;
    background: var(--bg-secondary, #2a2a2a);
    border-radius: 8px;
    border: 1px solid var(--border, #404040);
}

.check-panel.active {
    display: block;
}

.check-panel h3 {
    margin-bottom: 1rem;
    color: var(--text-primary, #fff);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-color, #ff4444);
    padding-bottom: 0.5rem;
}

.checks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.check-item {
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.check-item:hover {
    border-color: var(--accent-color, #ff4444);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.check-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.check-unit {
    font-weight: 600;
    color: var(--text-primary, #fff);
    font-size: 1.1rem;
}

.check-date {
    color: var(--text-secondary, #aaa);
    font-size: 0.9rem;
}

.check-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.check-status.status-available {
    background: #28a745;
    color: white;
}

.check-status.status-oos {
    background: #dc3545;
    color: white;
}

.check-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.check-type, .check-by {
    color: var(--text-secondary, #aaa);
    font-size: 0.9rem;
}

.check-notes {
    background: var(--bg-primary, #1a1a1a);
    border: 1px solid var(--border, #404040);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-secondary, #aaa);
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive Design for Unit Checks */
@media (max-width: 768px) {
    .checks-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .check-tab {
        text-align: center;
        padding: 1rem;
    }
    
    .check-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .check-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .check-unit {
        font-size: 1rem;
    }
    
    .check-status {
        align-self: flex-start;
    }
}

/* Apparatus Management */
.apparatus-management {
    padding: 1rem;
}

.apparatus-stats {
    margin-bottom: 2rem;
}

.apparatus-stats h3 {
    margin-bottom: 1rem;
    color: var(--text-primary, #fff);
    font-size: 1.2rem;
}

.fleet-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.apparatus-list-admin {
    background: var(--bg-secondary, #222);
    border-radius: 8px;
    padding: 1.5rem;
}

.apparatus-list-admin h3 {
    margin-bottom: 1rem;
    color: var(--text-primary, #fff);
    font-size: 1.2rem;
}

.apparatus-admin-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.apparatus-item {
    background: var(--bg-tertiary, #1a1a1a);
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: all 0.2s;
}

.apparatus-item:hover {
    background: var(--bg-hover, #2a2a2a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.apparatus-item div {
    color: var(--text-primary, #fff);
}

.apparatus-item div:first-child {
    font-weight: 500;
}

.apparatus-item .btn {
    padding: 0.5em 1em;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .apparatus-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .fleet-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Drug Tracker Dark Mode Enhancements --- */
.stat-card {
  background: var(--bg-secondary, #222) !important;
  color: var(--text-primary, #fff) !important;
  border: 1px solid var(--border, #333) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.drug-category {
  background: var(--bg-secondary, #222) !important;
  color: var(--text-primary, #fff) !important;
  border: 1px solid var(--border, #333) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.drug-card {
  background: var(--bg-tertiary, #181818) !important;
  color: var(--text-primary, #fff) !important;
  border: 1px solid var(--border, #333) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.drug-box-card {
  background: var(--bg-tertiary, #181818) !important;
  color: var(--text-primary, #fff) !important;
  border: 1px solid var(--border, #333) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

/* Make sure stat labels and muted text are readable */
.stat-content .stat-label,
.drug-strength, .drug-form, .box-description, .box-location {
  color: var(--text-secondary, #aaa) !important;
}

/* Category header text */
.category-header h3 {
  color: var(--text-primary, #fff) !important;
}

/* Schedule Calendar Styles */
.schedule-view-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.view-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-tab:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.view-tab.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.schedule-view {
    width: 100%;
}

.schedule-view.hidden {
    display: none;
}

/* Calendar Controls */
.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.calendar-week-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Weekly Calendar */
.weekly-calendar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.calendar-time-column {
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    border-right: 1px solid var(--border);
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day.today {
    background: var(--accent-color);
    color: white;
}

.calendar-body {
    max-height: 600px;
    overflow-y: auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
}

.calendar-time-slot {
    padding: 0.5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
}

.calendar-cell {
    padding: 0.5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    min-height: 60px;
    position: relative;
    background: var(--card-bg);
}

.calendar-cell:last-child {
    border-right: none;
}

.calendar-cell.today {
    background: rgba(255, 68, 68, 0.1);
}

.calendar-cell.other-month {
    background: var(--bg-primary);
    color: var(--text-muted);
}

/* Shift Events */
.shift-event {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shift-event:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.shift-event.callout {
    background: #6c757d;
    text-decoration: line-through;
}

.shift-event.late_callout {
    background: #ffc107;
    color: #212529;
}

.shift-event.completed {
    background: #28a745;
}

.shift-event.cancelled {
    background: #dc3545;
}

.shift-event.open {
    background: #17a2b8;
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

/* Shift Event Details */
.shift-event-details {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

.shift-event:hover .shift-event-details {
    display: block;
}

.shift-event-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.shift-event-details p {
    margin: 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.shift-event-details .shift-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.shift-event-details .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* Calendar Navigation */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav button {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav button:hover {
    background: var(--card-bg);
}

.calendar-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Calendar */
@media (max-width: 1200px) {
    .calendar-header {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .calendar-grid {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .calendar-time-column,
    .calendar-time-slot {
        padding: 0.25rem;
        font-size: 0.8rem;
    }
    
    .calendar-day {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .calendar-cell {
        padding: 0.25rem;
        min-height: 50px;
    }
    
    .shift-event {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .calendar-week-display {
        text-align: center;
        order: -1;
    }
    
    .calendar-header {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    .calendar-grid {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    .calendar-time-column,
    .calendar-time-slot {
        padding: 0.15rem;
        font-size: 0.7rem;
    }
    
    .calendar-day {
        padding: 0.25rem 0.15rem;
        font-size: 0.7rem;
    }
    
    .calendar-cell {
        padding: 0.15rem;
        min-height: 40px;
    }
    
    .shift-event {
        font-size: 0.6rem;
        padding: 0.1rem 0.2rem;
    }
    
    .shift-event-details {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        z-index: 2000;
    }
}

@media (max-width: 480px) {
    .schedule-view-tabs {
        flex-direction: column;
    }
    
    .view-tab {
        justify-content: center;
    }
    
    .calendar-header {
        grid-template-columns: 40px repeat(7, 1fr);
    }
    
    .calendar-grid {
        grid-template-columns: 40px repeat(7, 1fr);
    }
    
    .calendar-time-column,
    .calendar-time-slot {
        padding: 0.1rem;
        font-size: 0.6rem;
    }
    
    .calendar-day {
        padding: 0.15rem 0.1rem;
        font-size: 0.6rem;
    }
    
    .calendar-cell {
        padding: 0.1rem;
        min-height: 35px;
    }
    
    .shift-event {
        font-size: 0.5rem;
        padding: 0.05rem 0.1rem;
    }
}

/* === Extracted from member-portal.html === */
/* Apparatus Management Styles */
.apparatus-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.apparatus-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.apparatus-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.apparatus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.apparatus-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.apparatus-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.apparatus-status.available { background: #d4edda; color: #155724; }
.apparatus-status.out-of-service { background: #f8d7da; color: #721c24; }
.apparatus-status.maintenance { background: #fff3cd; color: #856404; }
.apparatus-status.training { background: #d1ecf1; color: #0c5460; }
.apparatus-status.emergency { background: #f8d7da; color: #721c24; }

.apparatus-details {
    margin-bottom: 1rem;
}

.apparatus-location, .apparatus-notes {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

.apparatus-image {
    margin: 1rem 0;
    text-align: center;
}

.apparatus-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.apparatus-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.unit-image-container {
    text-align: center;
    margin-bottom: 1rem;
}

.unit-detail-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.unit-details p {
    margin: 0.5rem 0;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.available { background: #d4edda; color: #155724; }
.status-badge.out-of-service { background: #f8d7da; color: #721c24; }
.status-badge.maintenance { background: #fff3cd; color: #856404; }
.status-badge.training { background: #d1ecf1; color: #0c5460; }
.status-badge.emergency { background: #f8d7da; color: #721c24; }

/* Form improvements */
.modal-body label {
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
    color: #333;
}

.modal-body input, .modal-body select, .modal-body textarea {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Schedule Calendar Styles */
.schedule-calendar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 1rem;
}

.schedule-calendar.dark {
    background: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-controls.dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-nav button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.calendar-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.calendar-week-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.calendar-body {
    max-height: 600px;
    overflow-y: auto;
    background: #f8f9fa;
}

.calendar-body.dark {
    background: #1a1a1a;
}

/* Calendar Grid Styles */
.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.calendar-header.dark {
    background: #2c3e50;
    border-bottom: 2px solid #34495e;
}

.calendar-time-header {
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: bold;
    color: #495057;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.calendar-time-header.dark {
    color: #ecf0f1;
    background: #34495e;
    border-right: 1px solid #2c3e50;
}

.calendar-day-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-right: 1px solid #dee2e6;
    background: #f8f9fa;
}

.calendar-day-header.dark {
    border-right: 1px solid #2c3e50;
    background: #34495e;
    color: #ecf0f1;
}

.calendar-day-header.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-day-header.dark.today {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.day-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 1.1rem;
    font-weight: bold;
}

/* New Calendar Layout Styles */
.calendar-day-row {
    display: flex;
    border-bottom: 1px solid var(--border);
    min-height: 120px;
}

.calendar-day-header {
    width: 150px;
    padding: 15px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: bold;
    color: var(--text-primary);
}

.calendar-shifts-header {
    flex: 1;
    padding: 15px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    font-weight: bold;
    color: var(--text-primary);
}

.calendar-shift-event {
    background: var(--accent-color);
    color: white;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid var(--accent-hover);
}

.calendar-shift-event:hover {
    background: var(--accent-hover);
    transform: translateX(2px);
}

.shift-time {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.shift-unit {
    font-size: 0.85em;
    margin-bottom: 2px;
}

.shift-position {
    font-size: 0.8em;
    opacity: 0.9;
    margin-bottom: 2px;
}

.shift-personnel {
    font-size: 0.75em;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-no-shifts {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Light theme overrides for new calendar */
body.light-theme .calendar-shift-event {
    background: #007bff;
    color: white;
}

body.light-theme .calendar-shift-event:hover {
    background: #0056b3;
}

body.light-theme .calendar-no-shifts {
    color: #6c757d;
}

/* Responsive design for new calendar layout */
@media (max-width: 768px) {
    .calendar-day-row {
        flex-direction: column;
        min-height: auto;
    }
    
    .calendar-day-header {
        width: 100%;
        padding: 10px;
        text-align: center;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .calendar-shift-event {
        margin: 2px 0;
        padding: 6px 10px;
    }
    
    .shift-time {
        font-size: 0.85em;
    }
    
    .shift-unit {
        font-size: 0.8em;
    }
    
    .shift-position {
        font-size: 0.75em;
    }
    
    .shift-personnel {
        font-size: 0.7em;
    }
}

/* Reports Section Styles */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.report-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.report-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.report-card p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.reports-history {
    margin-top: 30px;
}

.reports-history h3 {
    margin-bottom: 15px;
    color: #333;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.processing {
    background: #fff3cd;
    color: #856404;
}

.status-badge.failed {
    background: #f8d7da;
    color: #721c24;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
}

@media (max-width: 768px) {
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .report-card {
        padding: 15px;
    }
    
    .report-card h3 {
        font-size: 1em;
    }
    
    .report-card p {
        font-size: 0.85em;
    }
}

/* Apparatus Management Styles */
.apparatus-management {
    margin-top: 20px;
}

.apparatus-stats {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.apparatus-stats h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.fleet-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.apparatus-list-admin {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.apparatus-list-admin h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.apparatus-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.apparatus-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.apparatus-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.apparatus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f8f9fa;
}

.apparatus-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.apparatus-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.apparatus-status.status-active {
    background: #d4edda;
    color: #155724;
}

.apparatus-status.status-out-of-service {
    background: #f8d7da;
    color: #721c24;
}

.apparatus-status.status-maintenance {
    background: #fff3cd;
    color: #856404;
}

.apparatus-status.status-training {
    background: #d1ecf1;
    color: #0c5460;
}

.apparatus-status.status-reserve {
    background: #e2e3e5;
    color: #383d41;
}

.apparatus-details {
    margin-bottom: 15px;
}

.apparatus-type {
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
}

.apparatus-location {
    color: #495057;
    margin-bottom: 8px;
}

.apparatus-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.apparatus-year,
.apparatus-vin,
.apparatus-license,
.apparatus-pump,
.apparatus-tank,
.apparatus-pm {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.apparatus-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.apparatus-actions .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.no-apparatus {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-apparatus-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-apparatus h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.3rem;
}

.no-apparatus p {
    margin: 0 0 30px 0;
    color: #6c757d;
}

.no-apparatus-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fleet-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .apparatus-admin-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .apparatus-item {
        padding: 15px;
    }
    
    .apparatus-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .apparatus-actions {
        justify-content: center;
    }
    
    .no-apparatus-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Upload Modal Styles */
.upload-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: var(--accent-color);
    background: rgba(255, 68, 68, 0.05);
}

.upload-drop-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-drop-zone p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.upload-drop-zone small {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-options {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.upload-options label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.upload-options input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: var(--accent-color);
}

.upload-options label:last-child {
    margin-bottom: 0;
}

/* File Upload Modal Specific Styles */
#upload-file-modal .modal-content {
    max-width: 600px;
    width: 90%;
}

#upload-file-modal .modal-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

#upload-file-modal .modal-body {
    padding: 1.5rem 0;
}

#upload-file-modal .modal-actions {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1.5rem;
}

/* Drag and Drop Animation */
@keyframes dragPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.upload-drop-zone.drag-over {
    animation: dragPulse 0.5s ease-in-out;
}

/* File Selection Styles */
.selected-files {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.file-item:hover {
    background: var(--bg-primary);
    border-color: var(--accent-color);
}

.file-info {
    flex: 1;
    margin-right: 1rem;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-remove {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

/* Upload Progress */
.upload-progress {
    margin-top: 1rem;
    display: none;
}

.upload-progress.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff6666);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Responsive Design for Upload Modal */
@media (max-width: 768px) {
    #upload-file-modal .modal-content {
        width: 95%;
        margin: 2.5% auto;
    }
    
    .upload-drop-zone {
        padding: 1.5rem;
    }
    
    .upload-drop-zone i {
        font-size: 2.5rem;
    }
    
    .upload-drop-zone p {
        font-size: 1rem;
    }
    
    .file-item {
        padding: 0.5rem;
    }
    
    .file-name {
        font-size: 0.9rem;
    }
    
    .file-size {
        font-size: 0.8rem;
    }
}

/* Unit Check Styles */
.available-units-list {
    max-height: 400px;
    overflow-y: auto;
}

.unit-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary, #2a2a2a);
}

.unit-option:hover {
    background: var(--accent-color, #ff4444);
    color: white;
    border-color: var(--accent-color, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.unit-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.unit-details {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.unit-type {
    color: var(--text-secondary, #aaa);
    font-size: 0.9rem;
}

.unit-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.unit-status.status-available {
    background: #28a745;
    color: white;
}

.unit-status.status-oos {
    background: #dc3545;
    color: white;
}

.unit-status.status-training {
    background: #ffc107;
    color: #222;
}

.no-units {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #aaa);
    font-style: italic;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary, #2a2a2a);
    border-radius: 8px;
    border: 1px solid var(--border, #404040);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary, #fff);
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent-color, #ff4444);
}

.checkbox-group label:hover {
    color: var(--accent-color, #ff4444);
}

/* Responsive Design for Unit Checks */
@media (max-width: 768px) {
    .unit-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .unit-details {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .checkbox-group {
        padding: 0.75rem;
    }
    
    .checkbox-group label {
        font-size: 0.9rem;
    }
}

/* === Extracted from member-portal.html === */
/* Shift Details Styles */
.shift-details {
    background: var(--bg-secondary, #2a2a2a);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border, #404040);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: var(--accent-color, #ff4444);
    font-weight: 600;
}

/* Drug Box Details Styles */
.drug-box-details {
    background: var(--bg-secondary, #2a2a2a);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.inactive {
    background: #6c757d;
    color: white;
}

.status-badge.maintenance {
    background: #ffc107;
    color: #212529;
}

.status-badge.available {
    background: #28a745;
    color: white;
}

.status-badge.in-use {
    background: #007bff;
    color: white;
}

.status-badge.out-of-service {
    background: #dc3545;
    color: white;
}

/* Calendar Styles */
.calendar-day-row {
    display: flex;
    border-bottom: 1px solid var(--border, #404040);
}

.calendar-day-header {
    width: 120px;
    padding: 1rem;
    background: var(--bg-secondary, #2a2a2a);
    border-right: 1px solid var(--border, #404040);
    text-align: center;
}

.day-name {
    font-weight: 600;
    color: var(--accent-color, #ff4444);
    font-size: 0.9rem;
}

.day-date {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0.25rem;
}

.calendar-shifts-header {
    flex: 1;
    padding: 1rem;
    min-height: 100px;
}

.calendar-shift-event {
    background: var(--accent-color, #ff4444);
    color: white;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-shift-event:hover {
    background: #e63939;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.shift-time {
    font-weight: 600;
    font-size: 0.9rem;
}

.shift-unit {
    font-size: 0.8rem;
    opacity: 0.9;
}

.shift-position {
    font-size: 0.8rem;
    opacity: 0.8;
}

.shift-personnel {
    font-size: 0.8rem;
    opacity: 0.7;
}

.calendar-no-shifts {
    color: var(--text-muted, #888);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Available Units List Styles */
.available-units-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    background: var(--bg-secondary, #2a2a2a);
}

.unit-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border, #404040);
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-option:last-child {
    border-bottom: none;
}

.unit-option:hover {
    background: var(--accent-color, #ff4444);
    color: white;
}

.unit-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.unit-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.unit-type {
    color: var(--accent-color, #ff4444);
    font-weight: 500;
}

.unit-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.unit-status.available {
    background: #28a745;
    color: white;
}

.unit-status.in-use {
    background: #007bff;
    color: white;
}

.unit-status.maintenance {
    background: #ffc107;
    color: #212529;
}

/* Modal Improvements */
.modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    border-bottom: 1px solid var(--border, #404040);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
    color: var(--accent-color, #ff4444);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #404040);
}

/* Form Improvements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.form-input, .form-textarea, .form-select {
    padding: 0.75rem;
    border: 1px solid var(--border, #404040);
    border-radius: 4px;
    background: var(--bg-primary, #1a1a1a);
    color: var(--text-primary, #fff);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-color, #ff4444);
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Button Improvements */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color, #ff4444);
    color: white;
}

.btn-primary:hover {
    background: #e63939;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    border: 1px solid var(--border, #404040);
}

.btn-secondary:hover {
    background: var(--bg-tertiary, #3a3a3a);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Loading and Error States */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #888);
    font-style: italic;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #888);
    font-style: italic;
}

.error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .calendar-day-row {
        flex-direction: column;
    }
    
    .calendar-day-header {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border, #404040);
    }
    
}

/* SCHEDULE LOCATION STYLES */
.shift-location {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 2px;
}

.shift-location i {
    margin-right: 4px;
    color: var(--primary-color);
}

/* TICKET SALES STYLES */
.event-details {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.event-details h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 1.1em;
}

.event-details p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.sales-summary {
    margin-bottom: 20px;
}

.sales-summary h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sales-list h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1em;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.refunded {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.cancelled {
    background: #e2e3e5;
    color: #383d41;
}

/* Light theme overrides for ticket sales */
body.light-theme .event-details {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

body.light-theme .stat-item {
    background: #ffffff;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.light-theme .stat-number {
    color: #007bff;
}

body.light-theme .stat-label {
    color: #6c757d;
}
/* CERTIFICATION MANAGEMENT STYLES */
.panel-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.certifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.certification-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px var(--shadow);
    transition: all 0.3s ease;
}

.certification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.certification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.certification-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.certification-type {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.certification-type.fire { background: #f8d7da; color: #721c24; }
.certification-type.ems { background: #d1ecf1; color: #0c5460; }
.certification-type.safety { background: #d4edda; color: #155724; }
.certification-type.leadership { background: #fff3cd; color: #856404; }
.certification-type.specialized { background: #e2e3e5; color: #383d41; }

.certification-details {
    margin-bottom: 15px;
}

.certification-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.certification-detail .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.certification-detail .value {
    color: var(--text-primary);
    text-align: right;
}

.certification-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: inline-block;
}

.certification-status.active { background: #d4edda; color: #155724; }
.certification-status.expired { background: #f8d7da; color: #721c24; }
.certification-status.expiring { background: #fff3cd; color: #856404; }

.certification-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.certification-actions .btn {
    padding: 6px 12px;
    font-size: 0.8em;
}

/* Light theme overrides for certifications */
body.light-theme .certification-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body.light-theme .certification-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

body.light-theme .panel-header {
    border-bottom: 1px solid #dee2e6;
}

/* Scanner Styles */
.scanner-container {
    text-align: center;
    padding: 20px;
}

.scanner-controls {
    margin-top: 15px;
}

.scan-results {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.scan-result {
    margin-bottom: 10px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 3px;
}

.scan-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Drug Box Styles */
.drug-box-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.box-id {
    font-weight: bold;
    color: #333;
}

.box-type {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.box-type.narcotic {
    background: #dc3545;
    color: white;
}

.box-type.als {
    background: #007bff;
    color: white;
}

.box-type.bls {
    background: #28a745;
    color: white;
}

.box-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.box-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.box-location {
    color: #888;
    font-size: 12px;
}

.box-contents {
    margin: 10px 0;
}

.box-contents h5 {
    margin: 0 0 5px 0;
    color: #555;
    font-size: 14px;
}

.box-drugs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.box-drug-item {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

.box-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.inactive {
    background: #6c757d;
    color: white;
}

.status-badge.maintenance {
    background: #ffc107;
    color: #212529;
}

.status-badge.out_of_service {
    background: #dc3545;
    color: white;
}

.status-badge.resealed {
    background: #17a2b8;
    color: white;
}

/* Clock Dropdown Styles */
.clock-dropdown {
    position: relative;
    display: inline-block;
}

.clock-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 2.2em;
    min-width: 220px;
    background: #222;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    z-index: 2100;
    padding: 1em 1em 0.5em 1em;
}

.clock-dropdown .dropdown-menu.show {
    display: block;
}

.clock-dropdown .btn {
    background: #444;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.clock-dropdown .btn:hover {
    background: #666;
}

.clock-dropdown .btn-primary {
    background: #007bff;
    color: #fff;
}

.clock-dropdown .btn-primary:hover {
    background: #0056b3;
}

/* Manual Timepunch Modal Styles */
.manual-timepunch-modal .modal-content {
    max-width: 500px;
}

.manual-timepunch-modal .form-group {
    margin-bottom: 1rem;
}

.manual-timepunch-modal .form-input,
.manual-timepunch-modal .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.manual-timepunch-modal .form-textarea {
    min-height: 80px;
    resize: vertical;
}

.manual-timepunch-modal .modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.manual-timepunch-modal .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.manual-timepunch-modal .btn-primary {
    background: #007bff;
    color: white;
}

.manual-timepunch-modal .btn-primary:hover {
    background: #0056b3;
}

.manual-timepunch-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

.manual-timepunch-modal .btn-secondary:hover {
    background: #545b62;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    background: var(--card-bg, #242424);
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow, rgba(0,0,0,0.3));
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-content span {
    flex: 1;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted, #888888);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: var(--text-primary, #e0e0e0);
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-success .notification-content i {
    color: #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-error .notification-content i {
    color: #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-info .notification-content i {
    color: #17a2b8;
}

.notification-warning {
    border-left: 4px solid #ffc107;
}

.notification-warning .notification-content i {
    color: #ffc107;
}

/* Light theme overrides */
body.light-theme .notification {
    background: #ffffff;
    border-color: #dddddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body.light-theme .notification-content span {
    color: #333333;
}

body.light-theme .notification-close {
    color: #666666;
}

body.light-theme .notification-close:hover {
    color: #333333;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Group Bubbles for Schedule Management */
.personnel-with-groups {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.personnel-name {
    font-weight: 500;
    color: var(--text-primary, #fff);
    margin-bottom: 0.25rem;
}

.groups-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.group-bubble {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--accent-color, #ff4444);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* Color coding for different groups */
.group-bubble.admin {
    background: #dc3545;
    border-color: #c82333;
}

.group-bubble.supervisor {
    background: #fd7e14;
    border-color: #e55a00;
}

.group-bubble.paramedic {
    background: #28a745;
    border-color: #1e7e34;
}

.group-bubble.emt {
    background: #17a2b8;
    border-color: #138496;
}

.group-bubble.firefighter {
    background: #6f42c1;
    border-color: #5a32a3;
}

.group-bubble.volunteer {
    background: #6c757d;
    border-color: #5a6268;
}

.group-bubble.trainee {
    background: #ffc107;
    color: #212529;
    border-color: #e0a800;
}

.group-bubble.chief {
    background: #dc3545;
    border-color: #c82333;
    font-weight: 600;
}

.group-bubble.captain {
    background: #fd7e14;
    border-color: #e55a00;
    font-weight: 600;
}

.group-bubble.lieutenant {
    background: #17a2b8;
    border-color: #138496;
    font-weight: 600;
}

.group-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Light theme overrides for group bubbles */
body.light-theme .group-bubble {
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.light-theme .group-bubble.trainee {
    color: #212529;
}

/* Mobile responsive for group bubbles */
@media (max-width: 768px) {
    .groups-container {
        gap: 0.2rem;
    }
    
    .group-bubble {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Employee Profile Button Styling */
.employee-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 1rem;
}

.employee-info:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color, #ff4444);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.employee-info i {
    font-size: 1.2rem;
    color: var(--accent-color, #ff4444);
}

.employee-info span {
    font-weight: 500;
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
}

/* Light theme overrides for employee info */
body.light-theme .employee-info {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .employee-info:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color, #ff4444);
}

body.light-theme .employee-info span {
    color: var(--text-primary, #333);
}

/* Mobile responsive for employee info */
@media (max-width: 768px) {
    .employee-info {
        padding: 0.4rem 0.8rem;
        margin-left: 0.5rem;
    }
    
    .employee-info span {
        font-size: 0.8rem;
    }
}

/* Role and Groups Management Styles */
.role-groups-management {
    background: var(--card-bg, #2a2a2a);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.management-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border, #404040);
}

.management-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary, #ccc);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.management-tab:hover {
    color: var(--accent-color, #ff4444);
    background: rgba(255, 68, 68, 0.1);
}

.management-tab.active {
    color: var(--accent-color, #ff4444);
    border-bottom-color: var(--accent-color, #ff4444);
    background: rgba(255, 68, 68, 0.1);
}

.tab-content {
    display: none;
}

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

/* Permission Management Styles */
.permission-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.permission-category {
    background: var(--card-bg, #2a2a2a);
    border: 1px solid var(--border, #404040);
    border-radius: 8px;
    padding: 1.5rem;
}

.permission-category h4 {
    color: var(--accent-color, #ff4444);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.permission-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.permission-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.permission-item input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent-color, #ff4444);
}

.permission-item span {
    color: var(--text-primary, #fff);
    font-weight: 500;
}

.permission-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.permission-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

.permission-checkbox input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent-color, #ff4444);
}

.permission-checkbox span {
    color: var(--text-primary, #fff);
    font-size: 0.95rem;
}

.permission-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border, #404040);
}

/* Role Level Badges */
.role-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-level.level-1 {
    background: #28a745;
    color: #fff;
}

.role-level.level-2 {
    background: #17a2b8;
    color: #fff;
}

.role-level.level-3 {
    background: #ffc107;
    color: #212529;
}

.role-level.level-4 {
    background: #fd7e14;
    color: #fff;
}

.role-level.level-5 {
    background: #dc3545;
    color: #fff;
}

/* Light theme overrides for role management */
body.light-theme .role-groups-management {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

body.light-theme .permission-category {
    background: #fff;
    border-color: #dee2e6;
}

body.light-theme .permission-item span,
body.light-theme .permission-checkbox span {
    color: #333;
}

body.light-theme .management-tab {
    color: #666;
}

body.light-theme .management-tab:hover,
body.light-theme .management-tab.active {
    color: var(--accent-color, #ff4444);
}

/* Mobile responsive for role management */
@media (max-width: 768px) {
    .management-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .management-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .permission-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .permission-category {
        padding: 1rem;
    }
    
    .permission-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Setup Message Styles */
.setup-message {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg, #2a2a2a);
    border-radius: 8px;
    border: 1px solid var(--border, #404040);
}

.setup-message i {
    font-size: 3rem;
    color: var(--accent-color, #ff4444);
    margin-bottom: 1rem;
}

.setup-message h4 {
    color: var(--text-primary, #fff);
    margin-bottom: 1rem;
}

.setup-message p {
    color: var(--text-secondary, #ccc);
    margin-bottom: 1rem;
}

.setup-message code {
    background: var(--input-bg, #333);
    color: var(--accent-color, #ff4444);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.error-message {
    text-align: center;
    padding: 2rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border: 1px solid #dc3545;
}

.error-message i {
    font-size: 2rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-message h4 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-message p {
    color: var(--text-secondary, #ccc);
    margin-bottom: 1rem;
}

/* Setup Instructions Styles */
.setup-instructions {
    line-height: 1.6;
}

.setup-instructions h4 {
    color: var(--accent-color, #ff4444);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.setup-instructions h4:first-child {
    margin-top: 0;
}

.setup-instructions p {
    color: var(--text-primary, #fff);
    margin-bottom: 1rem;
}

.setup-instructions ul {
    color: var(--text-primary, #fff);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.setup-instructions li {
    margin-bottom: 0.5rem;
}

.code-block {
    background: var(--input-bg, #333);
    border: 1px solid var(--border, #404040);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: var(--text-primary, #fff);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.role-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.role-item {
    background: var(--card-bg, #2a2a2a);
    border: 1px solid var(--border, #404040);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-primary, #fff);
}

.role-item strong {
    color: var(--accent-color, #ff4444);
}

/* Light theme overrides for setup messages */
body.light-theme .setup-message {
    background: #f8f9fa;
    border-color: #dee2e6;
}

body.light-theme .setup-message h4 {
    color: #333;
}

body.light-theme .setup-message p {
    color: #666;
}

body.light-theme .setup-message code {
    background: #e9ecef;
    color: var(--accent-color, #ff4444);
}

body.light-theme .error-message {
    background: rgba(220, 53, 69, 0.05);
    border-color: #dc3545;
}

body.light-theme .error-message h4 {
    color: #dc3545;
}

body.light-theme .error-message p {
    color: #666;
}

body.light-theme .setup-instructions p,
body.light-theme .setup-instructions ul {
    color: #333;
}

body.light-theme .code-block {
    background: #f8f9fa;
    border-color: #dee2e6;
}

body.light-theme .code-block pre {
    color: #333;
}

body.light-theme .role-item {
    background: #fff;
    border-color: #dee2e6;
    color: #333;
}

/* Ensure profile modal is visible */
.modal.show {
    display: flex !important;
}

.modal.show .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Profile Modal Styling */
.profile-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg, #2a2a2a);
    border-radius: 12px;
    border: 1px solid var(--border, #404040);
}

.profile-avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--accent-color, #ff4444);
    border-radius: 50%;
    color: #fff;
    font-size: 2.5rem;
}

.profile-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-details h4 {
    margin: 0;
    color: var(--text-primary, #fff);
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-details p {
    margin: 0;
    color: var(--text-secondary, #ccc);
    font-size: 0.95rem;
    line-height: 1.4;
}

.profile-details strong {
    color: var(--text-primary, #fff);
    font-weight: 600;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #404040);
}

/* Light theme overrides for profile modal */
body.light-theme .profile-info {
    background: #f8f9fa;
    border-color: #dee2e6;
}

body.light-theme .profile-details h4 {
    color: var(--text-primary, #333);
}

body.light-theme .profile-details p {
    color: var(--text-secondary, #666);
}

body.light-theme .profile-details strong {
    color: var(--text-primary, #333);
}

body.light-theme .profile-actions {
    border-top-color: #dee2e6;
}

/* Profile Badges */
.role-badge, .group-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.1rem;
}

.role-badge {
    background: var(--accent-color, #ff4444);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.group-badge {
    background: #17a2b8;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #28a745;
    color: #fff;
}

.status-badge.inactive {
    background: #6c757d;
    color: #fff;
}

/* Light theme overrides for badges */
body.light-theme .role-badge,
body.light-theme .group-badge {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile responsive for profile modal */
@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        align-self: center;
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .profile-details h4 {
        font-size: 1.3rem;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .role-badge, .group-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }
}