/* OrtakAkıl - TSK Komuta Kontrol Sistemi */

/* Sidebar - Komutan Prestij Tasarımı */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-gradient);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    padding: 32px 28px;
    border-bottom: 1px solid var(--border-soft);
    background: transparent;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 0;
}

.logo i {
    font-size: 28px;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(226, 74, 74, 0.3));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-hover);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.user-rank {
    font-size: 16px;
    font-weight: 700;
    margin-top: 6px;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 28px 18px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background-color 0.2s ease,
        color 0.2s ease,
        border-left-color 0.2s ease,
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 600;
    font-size: 14px;
    border-left: 3px solid transparent;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    will-change: transform;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    border-left-color: var(--primary);
    transform: translateX(3px);
}

.nav-item.active {
    background: var(--bg-hover);
    color: var(--text-main);
    border-left-color: var(--primary);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.nav-item.active i,
.nav-item:hover i {
    color: var(--primary);
}

.badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    padding: 4px 11px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-footer {
    padding: 18px;
    border-top: 1px solid var(--border-color);
    background: transparent;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header - Komutan Prestij Tasarımı */
.header {
    height: var(--header-height);
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    border-left: 4px solid var(--primary);
    padding-left: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 20px;
    width: 340px;
}

.search-box i {
    color: var(--text-secondary);
    font-size: 16px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    color: var(--text-main);
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.notification-btn,
.chatbot-toggle {
    position: relative;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 52px;
    height: 52px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.notification-btn:hover,
.chatbot-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Content Area */
.content-area {
    padding: 32px;
}

/* Stats Grid - Komutan Prestij Kartları */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 36px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    will-change: transform;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

/* .stat-card.clickable * {
    pointer-events: none;
} */

.stat-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary);
    border: 2px solid var(--border-color);
}

.stat-content {
    flex: 1;
}

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

.stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.stat-change {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.warning {
    color: var(--warning);
}

.stat-change.neutral {
    color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Card overrides/specifics */
.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--primary);
}

.btn-small {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-panel {
    transition: all 0.2s ease;
}

.btn-close-panel:hover {
    color: var(--primary) !important;
    transform: rotate(90deg);
}

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

.badge-large {
    background: var(--danger);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.badge-large.warning {
    background: var(--warning);
}

.card-body {
    padding: 24px;
}

/* Unit Tree */
.unit-tree {
    font-size: 14px;
}

.unit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-hover);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unit-item:hover {
    background: var(--bg-input);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.unit-item.tugay {
    border-left-color: var(--warning);
    font-weight: 600;
}

.unit-item.tabur {
    border-left-color: var(--info);
    margin-left: 20px;
}

.unit-item.boluk {
    border-left-color: var(--success);
    margin-left: 40px;
    font-size: 13px;
}

.unit-item i {
    color: var(--primary);
}

.unit-count {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-hover);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.activity-item:hover {
    background: var(--bg-input);
}

.activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    background: var(--primary);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.activity-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.activity-time {
    color: var(--text-muted);
    font-size: 11px;
}

.activity-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.activity-status.pending {
    background: rgba(255, 165, 2, 0.15);
    color: var(--warning);
}

.activity-status.approved {
    background: rgba(67, 233, 123, 0.15);
    color: var(--success);
}

.activity-status.critical {
    background: rgba(245, 87, 108, 0.15);
    color: var(--danger);
}

/* Request List */
.request-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.request-item {
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.request-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.request-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary);
}

.request-type {
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.request-content {
    margin-bottom: 12px;
}

.request-from {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.request-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.btn-approve,
.btn-reject {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.btn-approve:hover {
    filter: brightness(0.9);
}

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

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

/* Inventory Critical List */
.inventory-critical-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inventory-critical-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--bg-hover);
    border-radius: 10px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
}

.item-unit {
    color: var(--text-secondary);
    font-size: 12px;
}

.item-stock {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
}

.stock-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.stock-fill {
    height: 100%;
    transition: width 0.3s ease;
    background: var(--primary);
}

.stock-value {
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
    color: var(--text-main);
}

/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 550px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.3s ease;
    z-index: 2000;
}

.chatbot-widget.active {
    transform: translateY(0);
}

.chatbot-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px 16px 0 0;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot {
    background: var(--bg-hover);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-input {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chatbot-input input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
}

.chatbot-input input:focus {
    border-color: var(--primary);
}

.chatbot-input button {
    background: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-input button:hover {
    background: var(--primary-hover);
}

/* Personnel Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal .modal-content {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 0;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.modal-header h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.personnel-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-hover);
    border-radius: 8px;
}

.personnel-stats .stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.personnel-stats .stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.personnel-stats .stat-value {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 700;
}

.personnel-table-wrapper {
    overflow-x: auto;
}

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

.personnel-table th,
.personnel-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.personnel-table th {
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
}

.personnel-table tr:hover {
    background: var(--bg-hover);
}

.personnel-table td {
    color: var(--text-main);
    font-size: 14px;
}

/* Confirmation Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 32px;
    width: 400px;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.modal-icon.approve {
    background: rgba(50, 210, 122, 0.15);
    color: var(--success);
}

.modal-icon.reject {
    background: rgba(230, 106, 106, 0.15);
    color: var(--danger);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.modal-message {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.modal-btn.confirm {
    color: white;
}

.modal-btn.confirm.approve {
    background: var(--success);
}

.modal-btn.confirm.reject {
    background: var(--danger);
}

.modal-btn.cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.modal-btn.cancel:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* Inventory Card Styles */
.inventory-card {
    background: var(--bg-panel);
    border: 2px solid rgba(227, 10, 23, 0.2);
    border-left-width: 4px;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
}

.inventory-card:hover {
    transform: translateY(-2px);
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.inventory-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.inventory-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.inventory-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

.inventory-stats {
    margin: 12px 0;
}

.inventory-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.inventory-progress {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.inventory-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.inventory-footer {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Transfer History Styles */
.transfer-card {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.transfer-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.transfer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.transfer-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.transfer-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.transfer-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.transfer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.transfer-stat {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 6px;
}

.transfer-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.transfer-stat-value {
    font-size: 13px;
    font-weight: 600;
}

.transfer-notes {
    padding: 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.transfer-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Notification Styles */
.notification-toast {
    position: fixed;
    top: 100px;
    right: 32px;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    font-weight: 600;
}

.notification-toast.success {
    background: var(--success);
}

.notification-toast.error {
    background: var(--danger);
}

.notification-toast.warning {
    background: var(--warning);
}

.notification-toast.info {
    background: var(--secondary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================================================
   SETTINGS PAGE STYLES - Modern Premium UI
   ============================================================================ */

/* Settings Grid Layout */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    padding: 0;
}

/* Settings Section */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Setting Item - Modern Card Style */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-hover);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    gap: 20px;
}

.setting-item:hover {
    background: var(--bg-input);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Setting Label */
.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.setting-label i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px;
    font-size: 18px;
    flex-shrink: 0;
}

.setting-label span {
    font-weight: 600;
    color: var(--text-main);
    font-size: 15px;
}

/* Setting Control */
.setting-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    width: 250px;
    min-width: unset;
    transition: all 0.3s ease;
    outline: none;
    text-align: left;
}

.setting-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-control:hover {
    border-color: var(--primary);
}

/* Setting Value (read-only) */
.setting-value {
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    background: var(--bg-input);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Toggle Switch - Modern Design */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    transition: all 0.3s ease;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(26px);
    background: white;
}

.toggle-switch:hover .toggle-slider {
    border-color: var(--primary);
}

/* Settings Card Header Enhancement */
.settings-grid .card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom: 2px solid var(--border-color);
}

.settings-grid .card-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
}

.settings-grid .card-header h3 i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 8px;
    font-size: 16px;
}

/* Button Enhancements for Settings */
.settings-grid .btn-small {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-grid .btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Settings Page Specific Card Styling */
#settings-panel .card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#settings-panel .card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.1);
}

/* Responsive Design for Settings */
@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .setting-control {
        width: 100%;
    }

    .toggle-switch {
        align-self: flex-end;
    }
}

/* ==========================================
   SMART DASHBOARD STYLES (Migrated)
   ========================================== */

/* Akıllı Pano Specific Styles */
.smart-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    padding: 24px;
}

.insight-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.insight-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.insight-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.insight-body {
    margin-top: 16px;
    max-height: 325px;
    /* Increased height to 325px (250+75) as requested */
    overflow-y: auto;
    /* Scroll internally */
    padding-right: 8px;
    /* Space for scrollbar */
}

/* Custom scrollbar for insight cards */
.insight-body::-webkit-scrollbar {
    width: 6px;
}

.insight-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.insight-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.insight-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prediction-item {
    background: var(--dark-lighter);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

.prediction-item.high-urgency {
    border-left-color: #f5576c;
}

.prediction-item.medium-urgency {
    border-left-color: #ffa502;
}

.prediction-item.low-urgency {
    border-left-color: #43e97b;
}

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

.prediction-name {
    font-weight: 600;
    color: var(--text-main);
}

.urgency-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.urgency-badge.high {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.urgency-badge.medium {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.urgency-badge.low {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.prediction-details {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.confidence-bar {
    height: 4px;
    background: var(--dark-lighter);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.5s ease;
}

.recommendation-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.recommendation-priority {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.recommendation-priority.high {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.recommendation-priority.medium {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.recommendation-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.recommendation-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.recommendation-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

.anomaly-alert {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.1), rgba(249, 93, 106, 0.1));
    border: 1px solid rgba(245, 87, 108, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.anomaly-severity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.anomaly-severity.high {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.anomaly-severity.medium {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.chat-with-data {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--dark-lighter);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 14px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-response {
    background: var(--dark-lighter);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    display: none;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* KPI Cards Styles */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 24px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kpi-card-clickable {
    cursor: pointer;
}

.kpi-card-clickable:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.kpi-card-clickable:active {
    transform: translateY(-2px) scale(1.01);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: height 0.3s ease;
}

.kpi-card-clickable:hover::before {
    height: 6px;
}

.kpi-card-clickable::after {
    content: '→';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.kpi-card-clickable:hover::after {
    opacity: 0.6;
    right: 16px;
}

.kpi-value {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin: 12px 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kpi-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.kpi-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.kpi-change.positive {
    color: #43e97b;
}

.kpi-change.negative {
    color: #f5576c;
}

.kpi-change.neutral {
    color: #ffa502;
}

.kpi-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.2;
}

/* Quick Actions Bar */
.quick-actions-bar {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin: 0 24px 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: white;
    font-family: inherit;
}

.action-btn i {
    font-size: 32px;
    opacity: 0.9;
}

.action-btn .action-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.action-btn .action-desc {
    font-size: 12px;
    opacity: 0.8;
}

.action-btn.critical {
    background: linear-gradient(135deg, #f5576c, #f95d6a);
}

.action-btn.warning {
    background: linear-gradient(135deg, #ffa502, #ff9a00);
}

.action-btn.success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.action-btn.info {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    padding: 0 24px 24px 24px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Risk Map Styles */
.risk-map-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin: 0 24px 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.risk-card {
    background: var(--dark-lighter);
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid;
    transition: transform 0.2s;
}

.risk-card:hover {
    transform: translateX(4px);
}

.risk-card.critical {
    border-left-color: #f5576c;
}

.risk-card.high {
    border-left-color: #ffa502;
}

.risk-card.medium {
    border-left-color: #ffd32a;
}

.risk-card.low {
    border-left-color: #43e97b;
}

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

.risk-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.risk-level {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.risk-level.critical {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.risk-level.high {
    background: rgba(255, 165, 2, 0.2);
    color: #ffa502;
}

.risk-level.medium {
    background: rgba(255, 211, 42, 0.2);
    color: #ffd32a;
}

.risk-level.low {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
}

.risk-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.risk-timeline {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* What-If Analysis Styles */
.whatif-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin: 0 24px 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.whatif-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.scenario-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--dark-lighter);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-align: left;
}

.scenario-btn:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.scenario-btn i {
    font-size: 24px;
    color: var(--primary);
}

.scenario-btn span {
    font-size: 14px;
    font-weight: 600;
}

.whatif-results {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.simulation-result {
    margin-bottom: 16px;
}

.simulation-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--dark-lighter);
    border-radius: 8px;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-main);
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.metric-change.negative {
    color: #f5576c;
}

.metric-change.positive {
    color: #43e97b;
}

/* Natural Language Commands Styles */
.nlp-commands-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin: 0 24px 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nlp-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.nlp-input {
    flex: 1;
    padding: 16px 20px;
    background: var(--dark-lighter);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.3s;
}

.nlp-input:focus {
    outline: none;
    border-color: var(--primary);
}

.nlp-send-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.nlp-send-btn:hover {
    transform: scale(1.05);
}

.nlp-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.suggestion-chip {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.suggestion-chip:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.scenario-chip {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.scenario-chip:hover {
    background: rgba(118, 75, 162, 0.15);
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.2);
}

.nlp-response {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1), rgba(56, 249, 215, 0.1));
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.command-result {
    margin-bottom: 16px;
}

.command-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(67, 233, 123, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #43e97b;
    margin-bottom: 12px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-bar {
        flex-direction: column;
        gap: 8px;
    }

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

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

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

    .whatif-scenarios {
        grid-template-columns: 1fr;
    }

    .nlp-input-wrapper {
        flex-direction: column;
    }

    .nlp-send-btn {
        width: 100%;
    }

    header h1 {
        font-size: 20px;
    }

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

    .chat-input-wrapper {
        flex-direction: column;
    }

    .chat-send-btn {
        width: 100%;
    }
}

/* Geo Map Styles */
.geo-map-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin: 0 24px 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
}

.location-markers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.location-card {
    background: var(--dark-lighter);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.location-card:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.location-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-info h4 {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.location-info p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Leaflet Popup Styles */
.leaflet-popup-content-wrapper {
    background: var(--card-bg);
    color: var(--text-main);
    border-radius: 12px;
}

.leaflet-popup-tip {
    background: var(--card-bg);
}

.custom-popup .popup-header {
    font-weight: 700;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.custom-popup .popup-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 12px;
}

/* Email Report Styles */
.email-report-config {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin: 0 24px 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.config-section h4 {
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: var(--text-main);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.schedule-options {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.radio-label input[type="radio"] {
    accent-color: var(--primary);
}

.email-input-group {
    display: flex;
    gap: 12px;
}

.email-input-group input {
    flex: 1;
    padding: 10px 16px;
    background: var(--dark-lighter);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
}

.preview-box {
    background: var(--dark-lighter);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.preview-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.preview-subject {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 500px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.chatbot-message.bot .message-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.chatbot-message.bot .message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 0 16px 16px 16px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-quick-actions {
    padding: 0 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chatbot-quick-actions .quick-action-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-main);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.chatbot-quick-actions .quick-action-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.chatbot-input {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.chatbot-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.3s;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

.chatbot-input button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

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

.preview-body {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.send-test-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: opacity 0.2s;
}

.send-test-btn:hover {
    opacity: 0.9;
}

/* Global Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

.search-results-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.search-result-category {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    backdrop-filter: blur(5px);
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 2px;
}

.search-result-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Notification Dropdown Styles */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-top: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-dropdown.active {
    display: block;
    animation: slideDownFade 0.3s ease-out;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

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

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.notification-clear {
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-clear:hover {
    background: rgba(102, 126, 234, 0.1);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notification-icon.info {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.notification-icon.success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.notification-icon.warning {
    background: rgba(241, 196, 15, 0.1);
    color: var(--warning);
}

.notification-icon.danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.notification-content {
    flex: 1;
}

.notification-text {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Standardize Dashboard Card Heights */
.dashboard-grid .card .card-body {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
    /* Prevent content from hitting scrollbar */
}

/* Custom Scrollbar for Cards */
.dashboard-grid .card .card-body::-webkit-scrollbar {
    width: 6px;
}

.dashboard-grid .card .card-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.dashboard-grid .card .card-body:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-grid .card .card-body::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}

.dashboard-grid .card .card-body:hover::-webkit-scrollbar-thumb {
    background: var(--primary);
}

.dashboard-grid .card .card-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}