/* ==================== ROOT & VARIABLES - MKCE THEME ==================== */
:root {
    /* MKCE Brand Colors */
    --mkce-blue: #003366;
    --mkce-blue-dark: #002244;
    --mkce-blue-light: #004488;
    --mkce-red: #C41E3A;
    --mkce-red-dark: #A01830;
    --mkce-white: #FFFFFF;

    /* Primary theme using MKCE colors */
    --primary: linear-gradient(135deg, #003366 0%, #004488 100%);
    --primary-color: #003366;
    --secondary-color: #C41E3A;
    --accent-gradient: linear-gradient(135deg, #C41E3A 0%, #E63850 100%);

    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #1a1a2e;
    --gray: #6c757d;
    --border: #dee2e6;

    /* Professional Fonts */
    --font-main: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 2px 10px rgba(0, 51, 102, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 51, 102, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 51, 102, 0.1);

    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 51, 102, 0.1);
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: #f9f9f9;
    color: var(--dark);
    line-height: 1.6;
}

/* ==================== TYPOGRAPHY ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

/* ==================== CONTAINER & LAYOUT ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVBAR - MKCE ==================== */
.navbar {
    background: linear-gradient(135deg, #003366 0%, #004488 100%);
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

/* Brand Styling */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-brand:hover .brand-icon {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(360deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.brand-text {
    color: white;
    letter-spacing: 0.5px;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    list-style: none;
}

/* Nav Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

/* Nav Icons */
.nav-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-link:hover .nav-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* AI Icon Special Style */
.ai-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(245, 87, 108, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(245, 87, 108, 0.8);
    }
}

/* User Menu */
.user-menu {
    position: relative;
    margin-left: 1rem;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
}

.user-name {
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-menu:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem;
    list-style: none;
}

.user-menu:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    list-style: none;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    color: #dc3545;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-link:hover {
    background: #fff5f5;
    color: #dc3545;
}

.logout-link i {
    font-size: 1rem;
}

/* Login Link */
.login-link {
    color: rgba(255, 255, 255, 0.9);
}

/* Register Button */
.btn-register {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.7rem 1.5rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: #764ba2;
}

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

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    font-family: inherit;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-logout {
    background: var(--danger);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn i {
    margin-right: 6px;
}

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

/* ==================== ALERTS ==================== */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: inherit;
    opacity: 0.7;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

/* ==================== AUTHENTICATION ==================== */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray);
}

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

.auth-footer {
    text-align: center;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== DASHBOARD ==================== */
.dashboard-container {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* ==================== CARDS & GRIDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: var(--transition);
}

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

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0;
}

.stat-content p {
    color: var(--gray);
    margin: 0.5rem 0 0 0;
}

/* ==================== VIVA CARDS ==================== */
.viva-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.viva-card:hover {
    box-shadow: var(--shadow-lg);
}

.viva-lab h3 {
    margin: 0;
}

.lab-code {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.viva-details {
    display: flex;
    gap: 1rem;
    margin: 0 2rem;
    color: var(--gray);
}

.viva-details p {
    margin: 0;
}

.vivaes-list {
    margin-bottom: 2rem;
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.quick-actions .btn {
    flex: 1;
    min-width: 200px;
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.footer p i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ==================== UTILITY CLASSES ==================== */
.mt-3 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

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

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--gray);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    margin: 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
    }

    .user-menu {
        margin-left: 0;
        width: 100%;
    }

    .user-dropdown-trigger {
        width: 100%;
        justify-content: center;
    }

    .btn-register {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .viva-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .viva-details {
        margin: 0;
        width: 100%;
    }

    .quick-actions .btn {
        width: 100%;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .auth-card {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }
}