:root {
    --ntg-purple: #3D2F82;
    --ntg-purple-light: #5A4BA0;
    --ntg-pink: #E93081;
    --ntg-gradient-btn: linear-gradient(90deg, #3D2F82 0%, #E93081 100%);
    --ntg-bg: #F5F3FA;
    --ntg-white: #FFFFFF;
    --ntg-text: #2D2D2D;
    --ntg-text-muted: #8B8B9E;
    --ntg-border: #E8E5F0;
    --ntg-sidebar-bg: #1A1035;
    --ntg-sidebar-text: #B8B0D0;
    --ntg-sidebar-active: #6B4FB8;
    --ntg-orange: #F49200;
    --ntg-green: #A2C72D;
    --ntg-blue: #3EA4DD;
}

* { box-sizing: border-box; }

body {
    font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--ntg-bg);
    color: var(--ntg-text);
    margin: 0;
}

.ntg-color-bar {
    height: 6px;
    background: linear-gradient(90deg, #3D2F82 0%, #3D2F82 20%, #E93081 20%, #E93081 40%, #F49200 40%, #F49200 60%, #A2C72D 60%, #A2C72D 80%, #3EA4DD 80%, #3EA4DD 100%);
    width: 100%;
}

.btn-ntg {
    background: var(--ntg-gradient-btn);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-ntg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.12));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-ntg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 47, 130, 0.25);
    color: white;
}

.btn-ntg:hover::after { opacity: 1; }

.btn-ntg:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(61, 47, 130, 0.2);
}

.btn-ntg-full {
    width: 100%;
}

.btn-ntg-outline {
    background: transparent;
    color: var(--ntg-purple);
    border: 2px solid var(--ntg-border);
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-ntg-outline:hover {
    border-color: var(--ntg-purple);
    color: var(--ntg-purple);
    background: rgba(61, 47, 130, 0.03);
    transform: translateY(-1px);
}

.ntg-card {
    background: var(--ntg-white);
    border: 2px solid var(--ntg-border);
    border-radius: 18px;
    padding: 24px;
    transition: box-shadow 0.25s ease;
}

.ntg-card:hover {
    box-shadow: 0 4px 20px rgba(74, 45, 138, 0.06);
}

.ntg-card-clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* === KPI STAT CARDS === */
.ntg-stat-card {
    background: var(--ntg-white);
    border: 2px solid var(--ntg-border);
    border-radius: 14px;
    padding: 20px 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ntg-stat-card:hover {
    border-color: rgba(61, 47, 130, 0.15);
    box-shadow: 0 2px 12px rgba(61, 47, 130, 0.05);
}

.ntg-stat-card .stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ntg-text-muted);
    margin-bottom: 8px;
}

.ntg-stat-card .stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.stat-purple { color: var(--ntg-purple); }

/* === INPUTS === */
.ntg-input {
    border: 2px solid var(--ntg-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s;
    background: var(--ntg-white);
}

.ntg-input:focus {
    outline: none;
    border-color: var(--ntg-purple-light);
    box-shadow: 0 0 0 4px rgba(74, 45, 138, 0.08);
}

.ntg-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ntg-text-muted);
    margin-bottom: 6px;
    display: block;
}

.ntg-sidebar {
    background: var(--ntg-sidebar-bg);
    width: 200px;
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
}

.ntg-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.ntg-sidebar-brand h3 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.ntg-sidebar-brand small {
    color: var(--ntg-sidebar-text);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.ntg-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.ntg-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ntg-sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 4px;
}

.ntg-sidebar-nav li a i[data-lucide] { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.ntg-sidebar-nav li a.active i[data-lucide] { opacity: 1; }

.ntg-sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding-left: 16px;
}

.ntg-sidebar-nav li a.active {
    background: var(--ntg-sidebar-active);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 79, 184, 0.3);
}

.ntg-sidebar-footer {
    margin-top: auto;
}

.ntg-sidebar-lang {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ntg-sidebar-lang a {
    flex: 1;
    text-align: center;
    padding: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}

.ntg-sidebar-lang a.active {
    background: var(--ntg-pink);
    color: white;
}

.ntg-sidebar-lang a:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ntg-sidebar-text);
}

.ntg-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
}

.ntg-sidebar-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ntg-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.ntg-sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.ntg-sidebar-user .user-org {
    font-size: 11px;
    color: var(--ntg-sidebar-text);
}

.ntg-main {
    margin-left: 200px;
    padding: 32px 40px;
    min-height: 100vh;
    overflow-x: hidden;
    transition: opacity .15s ease, transform .15s ease;
}

.login-split {
    display: flex;
    min-height: 100vh;
}

.login-hero {
    flex: 0 0 55%;
    background: linear-gradient(135deg, #1A1035 0%, #2D1B69 50%, #4A2D8A 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 40px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(61, 47, 130, 0.4);
    animation: heroFloat 10s ease-in-out infinite;
}

.login-hero::after {
    content: '';
    position: absolute;
    top: 140px;
    right: 160px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(90, 75, 160, 0.3);
    animation: heroFloat 12s ease-in-out 1s infinite reverse;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-15px, 15px); }
}

.login-hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

.login-form-container {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.login-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.login-hero p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    line-height: 1.6;
}

.login-hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
}

.login-hero-stats .stat h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.login-hero-stats .stat small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.login-hero-footer {
    margin-top: 40px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--ntg-white);
}

.login-form-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-form-container .subtitle {
    color: var(--ntg-text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-form-container .form-group {
    margin-bottom: 20px;
}

.login-no-access {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--ntg-text-muted);
}

.login-no-access a {
    color: var(--ntg-purple);
    text-decoration: none;
}

.login-lang-switch {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 0;
}

.login-lang-switch a {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--ntg-border);
    transition: all 0.15s;
    color: var(--ntg-text-muted);
}

.login-lang-switch a:first-child {
    border-radius: 8px 0 0 8px;
}

.login-lang-switch a:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.login-lang-switch a.active {
    background: var(--ntg-purple);
    border-color: var(--ntg-purple);
    color: white;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ntg-text-muted);
    font-size: 16px;
}

.input-icon-wrapper .ntg-input {
    padding-left: 42px;
}

.input-icon-wrapper .icon-right {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ntg-text-muted);
    cursor: pointer;
    font-size: 16px;
    background: none;
    border: none;
}

.ntg-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ntg-badge-green {
    background: #ECFDF5;
    color: #059669;
}

.ntg-badge-gray {
    background: #F3F4F6;
    color: #6B7280;
}

.ntg-badge-orange {
    background: #FFF7ED;
    color: #D97706;
}

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

.ntg-table thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ntg-text-muted);
    padding: 12px 16px;
    border-bottom: 2px solid var(--ntg-border);
    text-align: left;
}

.ntg-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ntg-border);
    font-size: 14px;
}

.ntg-table tbody tr:hover {
    background: rgba(74, 45, 138, 0.03);
}

.ntg-table tbody tr {
    transition: background 0.15s ease;
}

/* Clickable rows */
.ntg-table tbody tr[style*="cursor"] { cursor: pointer; }
.ntg-table tbody tr[onclick]:hover { background: rgba(74, 45, 138, 0.05); }

.ntg-progress-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ntg-progress-mini .bar {
    width: 60px;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.ntg-progress-mini .bar .fill {
    height: 100%;
    border-radius: 3px;
    background: var(--ntg-gradient-btn);
}

.ntg-flash {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 300px;
    max-width: 500px;
}

.ntg-flash .alert {
    border-radius: 12px;
    font-family: 'Fredoka', sans-serif;
    animation: flashSlideIn 0.4s ease-out;
}

@keyframes flashSlideIn {
    0% { opacity: 0; transform: translateY(-16px); }
    100% { opacity: 1; transform: translateY(0); }
}

.ntg-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.15s;
}

.ntg-badge:hover { transform: scale(1.05); }

@media (max-width: 768px) {
    .login-split { flex-direction: column; }
    .login-hero { flex: none; padding: 40px; min-height: 300px; }
    .login-form-side { padding: 40px 24px; }
    .ntg-sidebar { display: none; }
    .ntg-main { margin-left: 0; }
}

.ntg-user-dropdown {
    position: relative;
}

.ntg-user-dropdown .ntg-sidebar-user {
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s;
}

.ntg-user-dropdown .ntg-sidebar-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ntg-user-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #2A1F5E;
    border-radius: 10px;
    margin-bottom: 6px;
    padding: 4px;
    display: none;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.ntg-user-dropdown-menu.open {
    display: block;
}

.ntg-user-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: #B8B0D0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s;
}

.ntg-user-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ntg-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid var(--ntg-border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
}

.ntg-type-card:hover {
    border-color: var(--ntg-purple-light) !important;
    background: var(--ntg-bg) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 47, 130, 0.08);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--ntg-purple);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    font-size: 14px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

.ntg-input:focus {
    outline: 2px solid var(--ntg-purple);
    outline-offset: 2px;
    box-shadow: none;
}

.btn:focus-visible,
.btn-ntg:focus-visible,
.btn-ntg-outline:focus-visible {
    outline: 2px solid var(--ntg-purple);
    outline-offset: 2px;
}

.ntg-sidebar-nav li a:focus-visible {
    outline: 2px solid white;
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --ntg-text-muted: #555555;
        --ntg-border: #999999;
    }
}