@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --poli-red: #e30613;
    --poli-blue: #1e2a78;
    /* Deep Blue from reference */
    --poli-dark: #0a0e29;
    /* Darker blue/black */
    --poli-gray: #0b0f19; /* Global dark bg */
    --text-dark: #cbd5e1; /* Global text color */
    --text-light: #ffffff;
    --font-primary: 'Jost', sans-serif;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--poli-gray);
    line-height: 1.6;
}

/* Headings color override for dark theme */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: #ffffff !important;
}

/* Text muted utility color tweak for readability */
.text-muted {
    color: #cbd5e1 !important;
}

/* --- Top Info Bar (White) --- */
.top-header {
    background-color: #0f172a;
    padding: 15px 0;
    border-bottom: 1px solid #334155;
}

.brand-logo-text {
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    color: #3b82f6;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.brand-logo-text span {
    color: var(--poli-red);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #94a3b8;
    border-right: 1px solid #334155;
    padding-right: 20px;
    margin-right: 20px;
}

.contact-info-item:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.contact-info-item i {
    color: var(--poli-red);
    font-size: 18px;
}

/* --- Main Navbar (Dark Blue) --- */
.main-navbar {
    background-color: var(--poli-blue);
    padding: 0;
    box-shadow: 0 4px 15px rgba(30, 42, 120, 0.2);
}

.main-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 15px;
    padding: 18px 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-giri {
    background-color: var(--poli-red);
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 15px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.btn-giri:hover {
    background-color: #c00000;
    transform: translateY(-1px);
}

/* --- Cards & Dashboard --- */
.card {
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-header {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
    font-weight: 700;
    color: #60a5fa;
    padding: 15px 20px;
}

/* Modüle göre kart üst çizgileri */
.border-start-primary {
    border-left-color: var(--poli-blue) !important;
}

.border-start-danger {
    border-left-color: var(--poli-red) !important;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--poli-blue);
    border-color: var(--poli-blue);
}

.btn-primary:hover {
    background-color: var(--poli-dark);
    border-color: var(--poli-dark);
}

.btn-danger {
    background-color: var(--poli-red);
    border-color: var(--poli-red);
}

/* --- Login Page Refinement --- */
/* --- Modern Split Login Layout --- */
.login-container {
    min-height: 100vh;
    display: flex;
    font-family: 'Jost', sans-serif;
    overflow: hidden;
}

/* Sol Taraf: Branding (Koyu) */
.login-brand-side {
    flex: 1;
    background-color: #0b0f19;
    /* Çok koyu lacivert/siyah */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

/* Dekoratif Arka Plan Efekti */
.login-brand-side::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(30, 42, 120, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.brand-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.brand-content h1 span {
    color: var(--poli-red);
}

.brand-feature-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.brand-feature-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.brand-feature-list li i {
    margin-right: 15px;
    color: var(--poli-red);
}

/* Sağ Taraf: Form (Beyaz) */
.login-form-side {
    flex: 1;
    background-color: #0b0f19;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.form-floating label {
    color: #999;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--poli-red);
}

.form-control:focus {
    border-color: var(--poli-red);
    box-shadow: 0 0 0 0.25rem rgba(227, 6, 19, 0.1);
}

.btn-login-new {
    background: linear-gradient(90deg, var(--poli-red) 0%, #ff4b55 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    width: 100%;
    transition: transform 0.2s;
    margin-top: 1rem;
}

.btn-login-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 6, 19, 0.3);
    color: white;
}

/* Mobil Uyumluluk */
@media (max-width: 992px) {
    .login-brand-side {
        display: none;
        /* Mobilde sol tarafı gizle */
    }
}

/* --- Modern Sidebar Styling --- */
:root {
    --sidebar-width-collapsed: 80px;
    --sidebar-width-expanded: 270px;
    --transition-speed: 0.3s;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--poli-gray);
}

/* Layout Content Wrapper */
.content-wrapper-modern {
    margin-left: var(--sidebar-width-collapsed);
    transition: margin-left var(--transition-speed) ease-in-out;
    padding-bottom: 50px;
}

/* Sidebar Box Container */
.sidebar-modern {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width-collapsed);
    background: linear-gradient(180deg, var(--poli-dark) 0%, var(--poli-blue) 100%);
    color: white;
    z-index: 1050;
    transition: width var(--transition-speed) ease-in-out;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    border-top-right-radius: 35px;
    border-bottom-right-radius: 35px;
}

/* Expand Sidebar on Hover */
.sidebar-modern:hover {
    width: var(--sidebar-width-expanded);
}

/* Top Branding area */
.sidebar-brand {
    padding: 20px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand-logo {
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    border-radius: 14px;
    background-color: var(--poli-red);
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.3);
}

.sidebar-brand-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-transform: uppercase;
}

.sidebar-brand-text span {
    color: var(--poli-red);
}

.sidebar-modern:hover .sidebar-brand-text {
    opacity: 1;
}

/* Navigation items container */
.sidebar-nav {
    flex-grow: 1;
    padding: 20px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 6px;
    position: relative;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
}

.sidebar-link i {
    font-size: 18px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sidebar-link-text {
    font-weight: 500;
    font-size: 14px;
    opacity: 0;
    margin-left: 10px;
    transition: opacity 0.2s ease;
}

.sidebar-modern:hover .sidebar-link-text {
    opacity: 1;
}

.sidebar-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Active Link Highlight (Pill card with curved left border) */
.sidebar-link.active,
.sidebar-link:focus {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--poli-red);
}

/* Sidebar Dropdown Menu Submenu */
.sidebar-dropdown-toggle::after {
    display: inline-block;
    margin-left: auto;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-modern:hover .sidebar-dropdown-toggle::after {
    opacity: 1;
}

.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    margin: 5px 0 10px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Hover submenus expansion style when expanded */
.sidebar-modern:hover .sidebar-menu-item:hover .sidebar-submenu,
.sidebar-modern:hover .sidebar-menu-item:focus-within .sidebar-submenu {
    max-height: 250px;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 15px 8px 45px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar-submenu-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.04);
    padding-left: 50px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.04);
    margin-bottom: 10px;
}

.sidebar-profile i {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile-info {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-modern:hover .sidebar-profile-info {
    opacity: 1;
}

.sidebar-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.sidebar-profile-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: capitalize;
}

.btn-giri-sidebar {
    background-color: var(--poli-red) !important;
    color: white !important;
    font-weight: 600;
    border-radius: 14px !important;
}

.btn-giri-sidebar:hover {
    background-color: #c00000 !important;
}

/* Top bar next to sidebar */
.top-bar-modern {
    background: #0f172a;
    height: 70px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.top-bar-contact {
    font-size: 13px;
    color: #94a3b8;
}

.top-bar-contact span {
    margin-right: 20px;
}

.top-bar-user {
    font-size: 14px;
    font-weight: 600;
    color: #60a5fa;
}

.mobile-header-modern {
    background-color: var(--poli-blue);
    height: 60px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1040;
}

/* Responsive adjustment */
@media (max-width: 992px) {
    .content-wrapper-modern {
        margin-left: 0 !important;
    }
    
    .sidebar-modern {
        left: -100px;
        border-radius: 0;
    }
    
    .sidebar-modern.show-mobile {
        left: 0 !important;
        width: var(--sidebar-width-expanded) !important;
        z-index: 1100;
    }
    
    .sidebar-modern.show-mobile .sidebar-brand-text,
    .sidebar-modern.show-mobile .sidebar-link-text,
    .sidebar-modern.show-mobile .sidebar-profile-info {
        opacity: 1 !important;
    }
}

/* ==========================================================================
   GLOBAL PREMIUM DARK MODE OVERRIDES (Bootstrap Components)
   ========================================================================== */

/* Form Elements */
.form-control, .form-select, select, input, textarea {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
}
.form-control:focus, .form-select:focus, select:focus, input:focus, textarea:focus {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border-color: var(--poli-red) !important;
    box-shadow: 0 0 0 0.25rem rgba(227, 6, 19, 0.15) !important;
}
.form-control::placeholder {
    color: #475569 !important;
}
.form-label, label {
    color: #f1f5f9 !important;
}
.form-floating label {
    color: #94a3b8 !important;
}
.form-text {
    color: #94a3b8 !important;
}

/* Table Overrides */
.table {
    --bs-table-bg: #1e293b !important;
    --bs-table-color: #cbd5e1 !important;
    --bs-table-striped-bg: #1e293b !important;
    --bs-table-hover-bg: #334155 !important;
    --bs-table-hover-color: #ffffff !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
.table th, .table td {
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
.table thead th, .table thead td {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}
.table-responsive {
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
}

/* Custom Table Row Variants for Premium Dark Theme */
.table-danger,
.table-danger > td,
.table-danger > th,
.table-warning,
.table-warning > td,
.table-warning > th,
.table-success,
.table-success > td,
.table-success > th,
.table-info,
.table-info > td,
.table-info > th {
    --bs-table-bg: #1e293b !important;
    --bs-table-color: #cbd5e1 !important;
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
.table-hover .table-danger:hover,
.table-hover .table-danger:hover > td,
.table-hover .table-danger:hover > th,
.table-hover .table-warning:hover,
.table-hover .table-warning:hover > td,
.table-hover .table-warning:hover > th,
.table-hover .table-success:hover,
.table-hover .table-success:hover > td,
.table-hover .table-success:hover > th,
.table-hover .table-info:hover,
.table-hover .table-info:hover > td,
.table-hover .table-info:hover > th {
    --bs-table-hover-bg: #334155 !important;
    background-color: #334155 !important;
    color: #ffffff !important;
}

/* Modals */
.modal-content {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}
.modal-header, .modal-footer {
    border-color: #334155 !important;
}
.btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

/* List Groups */
.list-group-item {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
.list-group-item:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

/* Alerts and Badges */
.alert {
    border: 1px solid rgba(255,255,255,0.08) !important;
}
.badge {
    font-weight: 600;
}

/* Dropdown Menus */
.dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}
.dropdown-item {
    color: #cbd5e1 !important;
}
.dropdown-item:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}
.dropdown-divider {
    border-color: #334155 !important;
}

/* Card Titles / Dashboard specific lists */
.card-title {
    color: #ffffff !important;
}
.text-secondary, .card-text {
    color: #cbd5e1 !important;
}

/* Custom Page elements */
.bg-light {
    background-color: #0f172a !important;
}
.bg-white {
    background-color: #1e293b !important;
}
.text-dark {
    color: #cbd5e1 !important;
}
.border-light {
    border-color: #334155 !important;
}
.border-bottom {
    border-color: #334155 !important;
}

/* Calendar / Schedule specific list views */
.schedule-table-th {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* Buttons */
.btn-secondary {
    background-color: #475569 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}
.btn-secondary:hover {
    background-color: #334155 !important;
    border-color: #334155 !important;
}
.btn-outline-secondary {
    color: #94a3b8 !important;
    border-color: #334155 !important;
}
.btn-outline-secondary:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}
.btn-outline-dark {
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}
.btn-outline-dark:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
    border-color: #64748b !important;
}

/* Switch & Checkbox Active Blue Styling */
.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
.form-switch .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.5) !important;
}