/**
 * SOFA-1 Epic Planner Branding
 * Primary Color: #001D3D (Dark Blue)
 * Font: Josefin Sans
 */

/* Font Face Declarations */
@font-face {
    font-family: 'Josefin Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/josefin-sans-v34-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Josefin Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/josefin-sans-v34-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Josefin Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/josefin-sans-v34-latin-600.woff2') format('woff2');
}

/* Global Styles */
body {
    font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 0;
    margin: 0;
    background-color: #f5f7fa;
}

/* Header Styles */
h1, h2, h3, h4, h5 {
    color: #001D3D;
    font-weight: 700;
}

h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #001D3D;
}

/* Top Navigation Bar */
.navbar {
    background-color: #001D3D !important;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 29, 61, 0.2);
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-version {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    margin-left: 8px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* User Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Main Content Area */
.main-content {
    padding: 20px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 29, 61, 0.1);
}

.card-header {
    background-color: #001D3D;
    color: white;
    font-weight: 700;
    border-radius: 8px 8px 0 0 !important;
}

/* Button Styles */
.btn-primary {
    background-color: #001D3D;
    border-color: #001D3D;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #003566;
    border-color: #003566;
}

.btn-primary:focus,
.btn-primary:active {
    background-color: #001D3D !important;
    border-color: #001D3D !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 29, 61, 0.5) !important;
}

.btn-outline-primary {
    color: #001D3D;
    border-color: #001D3D;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: #001D3D;
    border-color: #001D3D;
    color: white;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

/* Form Controls */
.form-control:focus {
    border-color: #001D3D;
    box-shadow: 0 0 0 0.2rem rgba(0, 29, 61, 0.25);
}

.form-check-input:checked {
    background-color: #001D3D;
    border-color: #001D3D;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #001D3D 0%, #003566 100%);
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
    padding: 2.5rem;
}

.login-card h1 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 2rem;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn img {
    height: 24px;
}

/* Setup Page Styles */
.setup-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.project-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
    position: relative;
}

.project-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.project-item .form-check-input {
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
    margin-left: 0;
    margin-right: 15px;
    float: none;
}

.project-item .form-check-input::before {
    display: none;
}

.project-item:hover {
    background: #e9ecef;
}

.project-item.selected {
    background: rgba(0, 29, 61, 0.1);
    border-left: 4px solid #001D3D;
}

.project-item .project-key {
    font-weight: 700;
    color: #001D3D;
    min-width: 100px;
}

.project-item .project-name {
    flex: 1;
    color: #495057;
}

/* Timeline Container */
.timeline-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 29, 61, 0.1);
    padding: 20px;
    margin-top: 20px;
    overflow-x: auto;
}

/* Timeline Header with Controls */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.timeline-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Today Marker */
.gantt .today-highlight {
    fill: #e74c3c !important;
    opacity: 0.3;
}

/* Status Colors */
.status-todo {
    background-color: #6c757d;
    color: white;
}

.status-inprogress {
    background-color: #007bff;
    color: white;
}

.status-done {
    background-color: #2ecc71;
    color: white;
}

/* Settings Page */
.settings-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.settings-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 29, 61, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Alert Notifications */
.alert {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #001D3D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .main-content {
        padding: 10px;
    }

    .login-card {
        margin: 20px;
        padding: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        gap: 15px;
    }

    .timeline-controls {
        width: 100%;
        justify-content: center;
    }
}

/* Version Display */
.version-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 1.5rem;
}

/* Gantt Chart Customization */
.gantt .bar-wrapper:hover .bar {
    opacity: 0.9;
}

.gantt .bar-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
}

.gantt .grid-header {
    fill: #001D3D;
}

.gantt .grid-header text {
    fill: white;
}

/* Epic Color Indicator */
.epic-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

/* Tooltip Styles */
.gantt-tooltip {
    background: #001D3D;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gantt-tooltip .title {
    font-weight: 700;
    margin-bottom: 5px;
}

.gantt-tooltip .dates {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}
