:root {
    --primary-color: #d22129; /* KB Red */
    --primary-hover: #b01b21;
    --text-color: #2b2b2b;
    --text-muted: #6c757d;
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --sidebar-bg: #1e1e1e;
    --sidebar-text: #ffffff;
    --sidebar-hover: #333333;
    
    --success: #28a745;
    --danger: #dc3545;
    --info: #007bff;
    --warning: #ffc107;
    
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* App View States (Login vs Main App) */
.view-state {
    display: none;
    height: 100vh;
    width: 100vw;
}

.view-state.active {
    display: block;
}

#app-view {
    display: none; /* hidden by default, toggled via JS */
    height: 100vh;
    flex-direction: column;
}
#app-view.active {
    display: flex;
}

/* --- LOGIN SCREEN --- */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, #e0e6ed 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-box h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

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

.login-box .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: var(--text-muted);
}

/* --- WARNING BANNER --- */
.cyber-banner {
    background-color: #ff3b30;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.btn-outline-light {
    border: 1px solid white;
    background: transparent;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: #ff3b30;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}


/* --- MAIN APP LAYOUT --- */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.logo {
    padding: 24px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-nav {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    border-left-color: var(--primary-color);
}

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

.user-profile {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.logout {
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
}

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

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-header {
    background-color: var(--card-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 20px;
    width: 300px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Notifications */
.notification-wrapper {
    position: relative;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.notifications-dropdown {
    position: absolute;
    top: 40px;
    right: -10px;
    width: 320px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease-in-out;
}

.notifications-dropdown.show {
    display: flex;
}

.notif-header {
    padding: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--bg-color);
    background-color: #f8f9fa;
}

.notif-item {
    padding: 15px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid var(--bg-color);
}

.notif-item.alert {
    background-color: #fff5f5;
}

.notif-icon {
    color: var(--danger);
    font-size: 24px;
}

.notif-text strong {
    display: block;
    margin-bottom: 5px;
    color: var(--danger);
}

.notif-text p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Rest of the UI styling */
.content-wrapper {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-color);
}

/* SPA Sections */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 20px;
}

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

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: rgba(0,0,0,0.01);
    border-top: 1px solid var(--bg-color);
    display: flex;
    gap: 10px;
}

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

.premium-card {
    border-top: 4px solid var(--primary-color);
}

.account-number {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

.balance {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
}

.currency {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

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

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

.btn-secondary {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e2e6ea;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--text-color);
}

/* Lists */
.list-card {
    padding: 0;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--bg-color);
    transition: var(--transition);
}

.list-item:hover {
    background-color: rgba(0,0,0,0.01);
}

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

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 15px;
}

.bg-red { background-color: var(--danger); }
.bg-green { background-color: var(--success); }

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 15px;
    margin-bottom: 2px;
}

.item-details p {
    font-size: 13px;
    color: var(--text-muted);
}

.item-amount {
    font-weight: 600;
    font-size: 16px;
}

.item-amount.positive { color: var(--success); }
.item-amount.negative { color: var(--text-color); }

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

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

/* Forms */
.form-card {
    padding: 30px;
    max-width: 800px;
}

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

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(210, 33, 41, 0.1);
}

.input-with-currency {
    position: relative;
}

.currency-label {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 500;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-color);
}

/* Credit Card Mockup */
.credit-card-mockup {
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    border-radius: 16px;
    padding: 25px;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credit-card-mockup::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.cc-logo {
    text-align: right;
    font-size: 30px;
}

.cc-number {
    font-size: 22px;
    letter-spacing: 2px;
    margin-top: 10px;
    font-family: monospace;
}

.cc-info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.cc-info div {
    display: flex;
    flex-direction: column;
}

.cc-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.cc-value {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Toggle Switch */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-color);
}

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

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.mt-4 {
    margin-top: 20px;
}

/* --- INVESTMENTS CHART --- */
.text-green {
    color: var(--success) !important;
}

.invest-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-color);
}

.invest-profit {
    color: var(--success);
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chart-container {
    height: 250px;
    display: flex;
    align-items: flex-end;
    padding-top: 20px;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    align-items: flex-end;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    justify-content: flex-end;
    flex: 1;
}

.bar-wrapper span {
    font-size: 12px;
    color: var(--text-muted);
}

.bar {
    width: 40px;
    background: linear-gradient(to top, var(--info), #6ea8fe);
    border-radius: 6px 6px 0 0;
    height: 0; /* Animated via JS */
    transition: height 1s ease-out;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    max-height: 90vh;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
    font-size: 15px;
}

.modal-alert {
    display: flex;
    gap: 20px;
    background: #fff5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--danger);
    margin: 20px 0;
}

.modal-alert i {
    font-size: 30px;
    color: var(--danger);
}

.modal-alert strong {
    color: var(--danger);
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.defense-list {
    list-style: none;
    margin-top: 15px;
}

.defense-list li {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.defense-list i {
    color: var(--success);
    margin-top: 3px;
}

.modal-footer {
    padding: 20px;
    background: var(--bg-color);
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .view-state, #app-view {
        height: auto;
        min-height: 100vh;
    }
    .app-container {
        flex-direction: column;
        overflow: visible;
    }
    .main-content {
        overflow-y: visible;
    }
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }
    .user-profile, .logo span {
        display: none;
    }
    .main-nav {
        flex-direction: row;
        padding: 0;
        justify-content: center;
    }
    .nav-item {
        padding: 10px;
    }
    .nav-item span {
        display: none;
    }
    .cyber-banner {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 5px 10px;
        font-size: 11px;
    }
    .cyber-banner .banner-content {
        flex-direction: column;
        gap: 2px;
        font-size: 11px;
    }
    .cyber-banner .score-badge {
        font-size: 10px;
        padding: 2px 6px;
        margin-left: 0 !important;
        margin-top: 5px;
    }
    .cyber-banner .btn-sm {
        font-size: 10px;
        padding: 3px 6px;
    }
    .bar {
        width: 20px;
    }
}

/* --- INTERACTIVE ATTACK STYLES --- */
.interactive-mode .cyber-banner {
    background-color: #ff9800;
}

.vishing-contact {
    margin: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.vishing-contact:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.vishing-icon {
    font-size: 24px;
    color: var(--primary-color);
}

.fake-phone {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 5px;
}

.trust-seals {
    margin: 0 20px 20px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
}

.seals-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.seal {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    transition: color 0.3s;
}

.trust-seals:hover .seal {
    color: white;
}

.malware-banner {
    background: linear-gradient(to right, #fff, #f0f7ff);
    border-left: 4px solid var(--info);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.malware-banner:hover {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.malware-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.malware-content i {
    font-size: 32px;
    color: var(--info);
}

.danger-overlay {
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
}

.panic-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    border: 4px solid var(--danger);
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.panic-header {
    color: var(--danger);
    margin-bottom: 20px;
}

.panic-header i {
    font-size: 50px;
    margin-bottom: 15px;
}

.panic-box p {
    margin-bottom: 20px;
    font-size: 16px;
}

.sms-overlay {
    z-index: 1500;
}

.sms-box {
    background: white;
    padding: 0;
    border-radius: 12px;
    max-width: 450px;
    overflow: hidden;
}

.sms-header {
    background: var(--warning);
    color: #333;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
}

.sms-header i {
    font-size: 24px;
}

.sms-body {
    padding: 30px;
    text-align: center;
}

.sms-urgent {
    color: var(--danger);
    margin: 20px 0;
    padding: 10px;
    background: #fff5f5;
    border-radius: 8px;
}

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

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

.edu-overlay {
    z-index: 3000;
    backdrop-filter: blur(8px);
}

.edu-header {
    background: #17a2b8; /* Educational blue */
}

.edu-text {
    font-size: 16px;
    line-height: 1.6;
}

.edu-text p {
    margin-bottom: 15px;
}

.edu-text ul {
    margin-left: 20px;
    margin-top: 10px;
}


/* --- MOBILE RESPONSIVENESS OVERRIDES --- */
@media (max-width: 768px) {
    .modal-content, .panic-box, .sms-box {
        width: 90%;
        margin: 5% auto;
    }

    .cyber-banner > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .btn-outline-light {
        margin: 0 !important;
        width: 100%;
    }

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

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .vishing-contact {
        margin: 10px;
        padding: 10px;
    }

    .trust-seals {
        display: none; /* Hide on small screens to save space, or simplify */
    }

    .sidebar {
        flex-wrap: wrap;
    }

    .main-nav {
        flex-wrap: wrap;
    }
}

/* --- HACKER TERMINAL --- */
.blinking-cursor {
    font-weight: bold;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
