/*
Tersane Takip Sistemi - Özel CSS Stilleri
Author: Tersane Takip Development Team
Version: 1.0
*/

/* CSS Variables - Tema Renkleri */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Login Sayfası Stilleri */
.login-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.login-sidebar .logo {
    margin-bottom: 2rem;
}

.login-sidebar .logo i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--warning-color);
}

.login-sidebar h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.login-sidebar p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: #f8f9fa;
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    outline: none;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: var(--transition);
    margin-top: 1rem;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* Dashboard Stilleri */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-logo i {
    margin-right: 0.5rem;
    color: var(--warning-color);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
}

.sidebar-menu li {
    margin: 0.25rem 1rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar-menu i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    width: 100%;
}

.header {
    background: white;
    height: var(--header-height);
    padding: 0 2rem;
    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: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Header Logo */
.header-logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Header Navigation Buttons */
.header-nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.nav-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-button i {
    font-size: 1rem;
}

.nav-button span {
    font-size: 0.85rem;
}

/* Global Search Styles */
.global-search-container {
    position: relative;
    margin-left: 1rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search-input {
    width: 300px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.9rem;
    background: #f8f9fa;
    transition: var(--transition);
    outline: none;
}

.global-search-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    width: 350px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: #6c757d;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-loading {
    position: absolute;
    right: 0.75rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.5rem;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:hover {
    background: var(--light-color);
}

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

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.search-result-icon.project { background: var(--primary-color); }
.search-result-icon.component { background: var(--success-color); }
.search-result-icon.bendingjob { background: var(--info-color); }
.search-result-icon.document { background: var(--warning-color); }
.search-result-icon.user { background: var(--secondary-color); }

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.search-result-subtitle {
    color: #6c757d;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.search-result-matched {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.search-result-type {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.search-result-content-match {
    margin: 0.25rem 0;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 3px;
    font-size: 0.75rem;
    color: #6c757d;
    max-height: 2.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.search-minimum-chars {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 200px;
    padding: 0.5rem 0;
    display: none;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.content {
    padding: 2rem;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.stat-card.success::before { background: var(--success-color); }
.stat-card.info::before { background: var(--info-color); }
.stat-card.warning::before { background: var(--warning-color); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.stat-icon.primary { background: var(--primary-color); }
.stat-icon.success { background: var(--success-color); }
.stat-icon.info { background: var(--info-color); }
.stat-icon.warning { background: var(--warning-color); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.info-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.info-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.info-card-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.chart-container {
    text-align: center;
    padding: 2rem 0;
}

.chart-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.chart-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.chart-label {
    color: #6c757d;
    font-size: 1rem;
}

.system-info {
    list-style: none;
    padding: 0;
}

.system-info li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.system-info li:last-child {
    border-bottom: none;
}

.system-info strong {
    color: var(--dark-color);
}

.system-info span {
    color: #6c757d;
}

/* Animasyonlar */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

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

.stat-card {
    animation: slideInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Tasarım */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .header {
        padding: 0 1rem;
    }

    .header-left {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-nav-buttons {
        display: none; /* Mobilde navigation butonları gizle */
    }

    .global-search-container {
        margin-left: 0;
        order: 3;
        width: 100%;
    }

    .global-search-input {
        width: 100%;
        max-width: 300px;
    }

    .global-search-input:focus {
        width: 100%;
        max-width: 350px;
    }

    .logo-image {
        height: 32px; /* Mobilde logo küçült */
    }

    .content {
        padding: 1rem;
    }

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

    .info-section {
        grid-template-columns: 1fr;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .login-sidebar {
        display: none;
    }
    
    .login-main {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .global-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .search-result-item {
        padding: 0.5rem;
    }
    
    .search-result-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .search-result-title {
        font-size: 0.85rem;
    }
    
    .search-result-subtitle {
        font-size: 0.75rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.rounded-circle { border-radius: 50%; }

.shadow { box-shadow: var(--box-shadow); }

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #6c757d;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--dark-color);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: bold;
    margin: 0 0.5rem;
}

/* Drill-down Navigation */
.drill-down-nav {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.drill-down-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.drill-down-content {
    padding: 1.5rem;
}

.level-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.level-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.level-arrow {
    color: #6c757d;
    font-size: 0.9rem;
}

.navigation-cards {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 5), minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.nav-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.nav-card:hover::before {
    transform: scaleX(1);
}

.nav-card-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Header layout: icon left, title right */
.nav-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.nav-card-header .nav-card-icon {
    margin-bottom: 0;
}

.nav-card-text {
    display: flex;
    flex-direction: column;
}

/* Completion indicator on the right */
.completion-indicator {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-ring {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-chart {
    width: 48px;
    height: 48px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke: var(--primary-color);
    animation: progress 1.2s ease-out forwards;
}

.percentage {
    fill: #343a40;
    font-size: 0.45rem;
    text-anchor: middle;
    font-weight: 700;
}

.progress-caption {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #6c757d;
}

.hold-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(220,53,69,0.12), rgba(220,53,69,0.04));
    color: #dc3545;
    border: 3px solid #dc3545;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

@keyframes progress {
    0% { stroke-dasharray: 0 100; }
}

@media (max-width: 1175px) {
    .completion-indicator { margin-left: 0; }
    .circular-chart { width: 44px; height: 44px; }
    .hold-badge { width: 44px; height: 44px; font-size: 0.9rem; }
}

.nav-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.nav-card-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.nav-card-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-card-metrics-inline {
    justify-content: flex-start;
    gap: 1rem 1.25rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.metric-label-inline {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.metric-value-inline {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 700;
}

.metric-sep { color: #adb5bd; margin: 0 0.25rem; }

/* Stack metrics vertically for widths below 1950px */
@media (max-width: 1950px) {
    .nav-card-metrics-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

/* Responsive adjustments for navigation cards */
/* Stack drill-down cards in a single column up to 1175px */
@media (max-width: 1175px) {
    .navigation-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-card-metrics-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .nav-card-title {
        font-size: 1rem;
    }

    .metric-label-inline {
        font-size: 0.8rem;
    }

    .metric-value-inline {
        font-size: 0.9rem;
    }
}

/* Very small screens: stack the cards */
@media (max-width: 720px) {
    .navigation-cards {
        grid-template-columns: 1fr;
    }
}

.metric-item {
    text-align: center;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.more-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
.shadow-lg { box-shadow: 0 15px 30px rgba(0,0,0,0.15); }

.transition { transition: var(--transition); }

/* --- Tables: normalize stripes/hover across pages --- */
.table { --bs-table-accent-bg: transparent; }
.table.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fc !important;
}
.table.table-hover tbody tr:hover {
    background-color: #eef2ff !important;
}

/* Ensure dark header style is not overridden by theme/DataTables */
.table-dark thead th,
.table-dark thead td,
.table-dark thead tr {
    background-color: #343a40 !important; /* Bootstrap dark */
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* DataTables tends to rewrite the header; enforce dark style there too */
table.dataTable thead.table-dark th,
table.dataTable thead.table-dark td,
table.dataTable thead.table-dark tr {
    background-color: #343a40 !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* --- DataTables alignment & sorting fixes --- */
/* Prevent header/body width drift when wrapped or when scroll is applied */
.dataTables_wrapper .dataTables_scrollHeadInner,
.dataTables_wrapper .dataTables_scrollHeadInner table {
    width: 100% !important;
}
table.dataTable {
    width: 100% !important;
}
/* Keep headers on a single line to avoid wrap-induced misalignment */
table.dataTable thead th, table.dataTable thead td {
    white-space: nowrap;
}
/* Position sort icons without pushing header text */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    position: relative;
    padding-right: 1.5rem; /* space for sort icons */
}
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    right: 0.5rem;
}
/* Hide sort icons and pointer for non-orderable columns */
table.dataTable thead th.sorting_disabled:before,
table.dataTable thead th.sorting_disabled:after {
    display: none !important;
}
table.dataTable thead th.sorting_disabled {
    cursor: default;
}
/* Prevent wrap on status and actions columns */
#circuitsTable th:nth-child(7),
#circuitsTable td:nth-child(7),
#circuitsTable th:nth-child(8),
#circuitsTable td:nth-child(8) {
    white-space: nowrap;
}
