/* =========================================================================
   URCIS Knowledge Repository - Global Styles
   ========================================================================= */

:root {
    /* Brand Colors */
    --primary: #4c1d95; /* Royal Violet */
    --primary-light: #6d28d9;
    --primary-dim: rgba(76, 29, 149, 0.1);
    --secondary: #059669; /* Vibrant Emerald */
    --secondary-dim: rgba(5, 150, 105, 0.1);
    
    /* Backgrounds */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-drawer: rgba(255, 255, 255, 0.85);
    
    /* Text */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* UI Elements */
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 30px rgba(76, 29, 149, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Fonts */
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

.hidden {
    display: none !important;
}

/* ---- Submit Knowledge CTA Button (in header) ---- */
.submit-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(76, 29, 149, 0.25);
    white-space: nowrap;
}

.submit-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 29, 149, 0.35);
    color: white !important;
}

.submit-cta-btn span {
    -webkit-text-fill-color: white;
}

@media (max-width: 480px) {
    .submit-cta-btn span { display: none; }
    .submit-cta-btn { padding: 0.55rem 0.9rem; }
}



/* =========================================================================
   Layout & Header
   ========================================================================= */

.app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-container {
    position: relative;
    width: 400px;
}

.search-container input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: rgba(255,255,255,0.9);
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Prominent Search */
.prominent-search-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 3.5rem 0 4rem 0;
    position: relative;
    z-index: 10;
}

.prominent-search {
    width: 100%;
    max-width: 800px;
}

.prominent-search input {
    padding: 1.5rem 2rem 1.5rem 4rem;
    font-size: 1.25rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(76, 29, 149, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.prominent-search input:focus {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--primary-light);
    box-shadow: 0 15px 50px rgba(76, 29, 149, 0.15);
    transform: translateY(-3px);
}

.prominent-search .search-icon {
    font-size: 1.6rem;
    left: 1.5rem;
    color: var(--secondary); /* Green color */
    transition: var(--transition);
}

.prominent-search input:focus + .search-icon,
.prominent-search input:focus ~ .search-icon {
    color: var(--secondary); /* Green color on focus */
    transform: translateY(-50%) scale(1.1);
}

.app-layout {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* =========================================================================
   Main Content Area
   ========================================================================= */

.content-area {
    flex-grow: 1;
}

/* Shift Grid */
.shift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.shift-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
}

.shift-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    z-index: 2;
}

.shift-img-wrapper {
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.shift-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.shift-card:hover .shift-img {
    transform: scale(1.1);
}

.shift-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.shift-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.shift-title {
    font-size: 0.95rem;
    color: var(--text-main);
    margin: 0;
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    justify-content: center;
    gap: 1.5rem;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    /* Staggered entrance animation applied via JS */
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.5s forwards;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.res-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-dim);
    color: var(--primary);
    margin-bottom: 1rem;
}

.res-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.res-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.res-excerpt {
    font-size: 0.9rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Skeleton Loaders */
.skeleton-card {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
    height: 200px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================================
   Glassmorphic Details Drawer
   ========================================================================= */

.drawer-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.details-drawer {
    position: fixed;
    top: 0; right: 0; width: 500px; height: 100%;
    background: var(--bg-drawer);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255,255,255,0.3);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.details-drawer.open {
    transform: translateX(0);
}

.close-drawer {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-drawer:hover {
    background: rgba(0,0,0,0.1);
    color: var(--primary);
}

.drawer-content {
    padding: 3rem 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.drawer-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.drawer-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.drawer-summary {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--primary-dim);
}

.btn-download:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-dim);
    color: white;
}

/* =========================================================================
   AI Copilot Chatbot FAB
   ========================================================================= */

.ai-fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ai-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseFab 2s infinite;
}

@keyframes pulseFab {
    0% { box-shadow: 0 0 0 0 rgba(76, 29, 149, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(76, 29, 149, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 29, 149, 0); }
}

.ai-fab:hover {
    transform: scale(1.1);
    animation: none;
}

.chat-window {
    width: 350px;
    height: 500px;
    background: var(--bg-drawer);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.chat-window.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Custom Model Selector */
.model-selector-wrapper {
    position: relative;
    width: 100%;
}

.model-selector-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white !important;
    padding: 0.4rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.model-selector-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.model-selector-btn .fa-microchip {
    font-size: 0.75rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.model-selector-btn span {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-chevron {
    font-size: 0.65rem !important;
    opacity: 0.7;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.model-chevron.open {
    transform: rotate(180deg);
}

.model-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 9999;
    display: none;
    max-height: 260px;
    overflow-y: auto;
}

.model-dropdown.open {
    display: block;
    animation: dropUp 0.18s ease;
}

@keyframes dropUp {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.model-group-label {
    padding: 0.5rem 0.85rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
}

.model-option {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text-main) !important;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.model-option:hover {
    background: var(--primary-dim);
    color: var(--primary) !important;
}

.model-option.active {
    background: var(--primary-dim);
    color: var(--primary) !important;
    font-weight: 600;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.bubble {
    padding: 0.85rem 1.1rem;
    border-radius: 15px;
    font-size: 0.88rem;
    line-height: 1.65;
    word-break: break-word;
}

.bubble p.chat-para {
    margin: 0 0 0.5rem 0;
}

.bubble p.chat-para:last-child {
    margin-bottom: 0;
}

.bubble .chat-heading {
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.7rem 0 0.25rem 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
}

.bubble .chat-list {
    margin: 0.3rem 0 0.5rem 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bubble .chat-list li {
    line-height: 1.55;
    padding-left: 0.25rem;
}

.ai-message .bubble {
    background: white;
    border: 1px solid var(--border);
    border-top-left-radius: 2px;
}

.user-message .bubble {
    background: var(--primary);
    color: white;
    border-top-right-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

.chat-input-area button {
    background: var(--primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-input-area button:hover {
    background: var(--secondary);
}

/* Citation Pill */
.citation-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--primary-dim);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 4px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: var(--transition);
}

.citation-pill:hover {
    background: var(--primary);
    color: white;
}

/* =========================================================================
   Admin Panel Styles
   ========================================================================= */

/* ... (Admin specific styles will be added here, similar premium feel) ... */

/* =========================================================================
   Authors & Gallery Styles
   ========================================================================= */

.authors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.author-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-main);
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.author-chip img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.author-chip i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-dim);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.drawer-authors {
    margin-bottom: 2rem;
}

.drawer-authors h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-authors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drawer-author-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.drawer-author-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.drawer-author-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-dim);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.drawer-author-info {
    display: flex;
    flex-direction: column;
}

.drawer-author-name {
    font-weight: 600;
    color: var(--text-main);
}

.drawer-author-type {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.image-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

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

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

/* Admin Form Dynamic Lists */
.dynamic-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dynamic-list-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.dynamic-list-item .form-group {
    margin-bottom: 0;
    flex: 1;
}

.btn-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-add-secondary {
    background: transparent;
    border: 1px dashed var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-add-secondary:hover {
    background: var(--primary-dim);
}

/* =========================================================================
   Footer
   ========================================================================= */

.app-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

/* =========================================================================
   Admin Panel Styles
   ========================================================================= */

.admin-body {
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* Login Screen */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(76, 29, 149, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(5, 150, 105, 0.15), transparent 40%);
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-lg);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.admin-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

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

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-dim);
}

#loginBtn.btn-primary {
    width: 100%;
}

.btn-outline {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--bg-main);
    color: var(--primary);
    border-color: var(--primary-dim);
}

.error-text {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Admin Dashboard Layout */
.admin-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header-row h2 {
    font-size: 1.5rem;
}

/* Table */
.table-container {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--bg-main);
}

.admin-table td {
    font-size: 0.95rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: var(--transition);
}

.text-primary {
    color: var(--primary);
}
.text-primary:hover {
    color: var(--primary-light);
}

.text-danger {
    color: #ef4444;
}
.text-danger:hover {
    color: #dc2626;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

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

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.close-btn:hover {
    color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

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

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

.form-row {
    display: flex;
    gap: 1.5rem;
}
.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="month"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-dim);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-main);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.upload-zone i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

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

.link-text {
    color: var(--primary);
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* ==========================================================================
   Loading Screen
   ========================================================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* Clean light background */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-video {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

.loading-logo {
    position: relative;
    width: auto;
    max-width: 90vw;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.loading-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loading-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--primary);
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: -1rem;
}

.loading-bar {
    width: 300px;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    margin-top: 1rem;
}

.loading-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--primary); /* Brand color */
    animation: loadBar 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loadBar {
    0% { width: 0%; }
    15% { width: 25%; }
    40% { width: 45%; }
    70% { width: 80%; }
    100% { width: 100%; }
}

/* ==========================================================================
   Animated Counters
   ========================================================================== */
.animated-counters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.counter-item {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.main-counters-simple {
    margin-top: 0.75rem;
    justify-content: center;
    gap: 1.5rem;
}

.main-counters-simple .counter-item {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.main-counters-simple .counter-number {
    font-size: 1.1rem;
}

.main-counters-simple .counter-label {
    text-transform: capitalize;
    font-size: 0.9rem;
    font-weight: 500;
}

.loading-counters {
    margin-top: 2rem;
}

.loading-counters .counter-item {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.counter-number {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    font-family: var(--font-head);
}

.counter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}
