/* ============================================
   CSS Variables - Easy to adjust
   ============================================ */
:root {
    /* Colors - Professional Banking Style */
    --color-primary: #C8102E;
    --color-primary-light: #E8344A;
    --color-primary-dark: #9B1B30;
    --color-sidebar-bg: #f8fafc;
    --color-sidebar-text: #1e293b;
    --color-sidebar-hover: #e2e8f0;
    --color-sidebar-active: #FDE8EB;
    --color-sidebar-active-border: #E8344A;
    --color-background: #ffffff;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --color-shadow: rgba(0, 0, 0, 0.05);
    --color-shadow-md: rgba(0, 0, 0, 0.1);
    
    /* Sizing - easy to change */
    --sidebar-width: 260px;
    --header-height: 64px;
    --border-radius: 6px;
    
    /* Fonts - Professional Cyrillic Support */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Header
   ============================================ */
.header {
    height: var(--header-height);
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.platform-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.exit-link {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.exit-link:hover {
    background-color: var(--color-sidebar-hover);
    border-color: var(--color-primary);
}

/* ============================================
   Main Container
   ============================================ */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 40px);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 40px;
    overflow-y: auto;
    box-shadow: 2px 0 8px var(--color-shadow);
}

.sidebar-nav {
    padding: 20px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    color: var(--color-sidebar-text);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: var(--color-sidebar-hover);
}

.nav-item.active {
    background-color: var(--color-sidebar-active);
    color: var(--color-primary);
    border-left-color: var(--color-sidebar-active-border);
    box-shadow: 0 1px 3px var(--color-shadow);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.nav-separator {
    height: 1px;
    background-color: var(--color-border);
    margin: 16px 0;
}

/* ============================================
   Main Content
   ============================================ */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    background-color: #fafbfc;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.page-content {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    padding: 40px;
    min-height: 500px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.placeholder-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    border: 2px dashed var(--color-border);
    border-radius: var(--border-radius);
    background-color: #fafbfc;
}

.placeholder-message p {
    font-size: 16px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    height: 40px;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

.footer p {
    font-size: 12px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    padding: 48px 40px;
    box-shadow: 0 4px 12px var(--color-shadow-md);
    text-align: center;
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img {
    height: 60px;
    width: auto;
}

.login-logo .logo-text {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-primary);
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    background-color: var(--color-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-secondary);
}

.login-button {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: var(--font-family);
}

.login-button:hover {
    background-color: var(--color-primary-dark);
}

/* ============================================
   Responsive (Basic)
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .nav-text {
        display: none;
    }
    
    .content {
        margin-left: 60px;
    }
    
    .platform-name {
        display: none;
    }
}

/* ============================================
   Home Page - Welcome Section
   ============================================ */
.welcome-section {
    text-align: center;
    margin-bottom: 48px;
    padding: 32px 0;
}

.welcome-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.welcome-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* ============================================
   Home Page - Cards Grid
   ============================================ */
.home-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.home-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--color-shadow-md);
    border-color: var(--color-primary-light);
}

.card-icon {
    width: 64px;
    height: 64px;
    background-color: var(--color-sidebar-active);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card-icon i {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.home-card:hover .card-icon {
    background-color: var(--color-primary);
}

.home-card:hover .card-icon i {
    color: var(--color-white);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ============================================
   Home Page - Responsive
   ============================================ */
@media (max-width: 1200px) {
    .home-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .welcome-description {
        font-size: 14px;
    }
}
/* ============================================
   Sidebar Toggle Button
   ============================================ */
.sidebar-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text);
}

.sidebar-toggle:hover {
    background-color: var(--color-sidebar-hover);
    border-color: var(--color-primary);
}

.sidebar-toggle i {
    width: 20px;
    height: 20px;
}

/* ============================================
   Collapsible Sidebar Styles
   ============================================ */
.sidebar {
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    width: 0;
}

.content {
    transition: margin-left 0.3s ease;
}

.sidebar-collapsed .content {
    margin-left: 0;
}



/* ============================================
   Home Page - Updated Card Styles
   ============================================ */
.home-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.home-card {
    background-color: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 240px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.home-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--color-primary-light);
    background-color: var(--color-white);
}

.card-icon {
    width: 56px;
    height: 56px;
    background-color: #FDE8EB;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.card-icon i {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.home-card:hover .card-icon {
    background-color: var(--color-primary);
    transform: scale(1.05);
}

.home-card:hover .card-icon i {
    color: var(--color-white);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* ============================================
   Page Header Update
   ============================================ */
.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.4;
}

/* ============================================
   Page Content Update for Home
   ============================================ */
.page-content {
    background-color: var(--color-white);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 48px;
    min-height: 500px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

/* ============================================
   Responsive Design for Cards
   ============================================ */
@media (max-width: 1400px) {
    .home-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .home-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .home-card {
        min-height: 200px;
        padding: 32px 24px;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-content {
        padding: 32px;
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
    }
    
    .card-icon i {
        width: 24px;
        height: 24px;
    }
}

/* ============================================
   Smooth Transitions for All Elements
   ============================================ */
.main-container,
.footer {
    transition: all 0.3s ease;
}

/* Center content when sidebar is collapsed */
.sidebar-collapsed .home-cards-grid {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.login-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}


/* ============================================
   BI Analytics Page
   ============================================ */
.bi-actions {
    margin-bottom: 32px;
}

.bi-section {
    margin-top: 24px;
}

.bi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.bi-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-sidebar-hover);
    border-color: var(--color-primary);
}

.btn-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.btn-danger:hover {
    background-color: #fecaca;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-small i {
    width: 14px;
    height: 14px;
}

/* Dashboard Grid */
.dashboards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1200px) {
    .dashboards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboards-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Card */
.dashboard-card {
    background-color: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 12px var(--color-shadow-md);
    border-color: var(--color-primary-light);
}

.dashboard-icon {
    width: 48px;
    height: 48px;
    background-color: #FDE8EB;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.dashboard-icon i {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.dashboard-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.dashboard-actions {
    display: flex;
    gap: 8px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px;
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    background-color: #fafbfc;
}

.empty-state i {
    width: 48px;
    height: 48px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.empty-state span {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--color-white);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-close i {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 400px;
}

.modal-hint {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
}

.text-muted {
    color: var(--color-text-secondary);
}
/* Available Dashboard Item in Modal */
.available-dashboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: #f8fafc;
}

.available-dashboard-item:hover {
    background-color: var(--color-white);
    border-color: var(--color-primary-light);
}

.available-dashboard-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}