/* FlowCore - Cypress Green & Ochre Theme */
:root {
    --primary-color: #1a4d2e;
    --primary-light: #2d6a4f;
    --primary-dark: #0f3921;
    --secondary-color: #52b788;
    --light-color: #f5e6d3;
    --bg-color: #faf8f3;
    --card-bg: #fff9f0;
    --border-color: #d4c5b0;
    --ochre-medium: #d4a574;
    --ochre-dark: #b8860b;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #1a3a2e;
    --text-color: #2d3436;
    --progress-red: #e74c3c;
    --progress-yellow: #f39c12;
    --progress-green: #27ae60;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.navbar {
    background: var(--primary-color);
    color: var(--light-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-color);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--light-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-link:hover { background: var(--primary-light); }
.nav-link.active { background: var(--secondary-color); }

.status-indicators {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.indicator-left, .indicator-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.indicator-left:hover, .indicator-right:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.indicator-dot.green { background: var(--success-color); }
.indicator-dot.yellow { background: var(--warning-color); }
.indicator-dot.orange { background: #e67e22; }
.indicator-dot.red { background: var(--danger-color); }

.indicator-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
}

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

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.stat-card h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-text {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.5rem;
}

.project-list { list-style: none; }

.project-card {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    background: var(--light-color);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress);
    z-index: 0;
    border-radius: 8px 0 0 8px;
}

.project-card.progress-low::before {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.25) 0%, rgba(243, 156, 18, 0.25) 100%);
}

.project-card.progress-medium::before {
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.25) 0%, rgba(39, 174, 96, 0.25) 100%);
}

.project-card.progress-high::before {
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.25) 0%, rgba(39, 174, 96, 0.35) 100%);
}

.project-card.progress-complete::before {
    background: rgba(39, 174, 96, 0.35);
}

.project-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.project-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-info h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.project-phase {
    background: var(--primary-color);
    color: var(--light-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-progress {
    text-align: right;
}

.progress-bar-container {
    width: 150px;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
}

.progress-bar.low {
    background: linear-gradient(90deg, var(--progress-red), var(--progress-yellow));
}

.progress-bar.medium {
    background: linear-gradient(90deg, var(--progress-yellow), var(--progress-green));
}

.progress-bar.high {
    background: var(--progress-green);
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--ochre-medium);
    color: white;
}

.btn-secondary:hover {
    background: var(--ochre-dark);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--dark-color);
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close:hover {
    color: var(--danger-color);
}

.quick-links {
    margin-top: 2rem;
}

.quick-links h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-link-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.quick-link-card .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #7f8c8d;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 5px;
    margin-top: 1rem;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .nav-menu { gap: 0.5rem; flex-wrap: wrap; }
    .stats-grid { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; gap: 1rem; }
    .status-indicators { flex-direction: column; }
    .quick-links-grid { grid-template-columns: 1fr; }
    .project-card-content { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ===================================
   Coming Soon Pages & Cards
   =================================== */

.coming-soon-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-dark);
}

.coming-soon {
    text-align: center;
    padding: 100px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.coming-soon h1 {
    color: var(--primary-color);
    font-size: 3em;
    margin-bottom: 20px;
}

.coming-soon p {
    font-size: 1.2em;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.6;
}

.coming-soon .btn-primary {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
}

.loading, .error {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: var(--text-dark);
}

/* Modal Active State */
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* Navbar styles */
.navbar {
    background: #1a4d2e;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    margin: 0;
    font-size: 1.3rem;
}

.navbar-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Button styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #1a4d2e;
    color: white;
}

.btn-primary:hover {
    background: #153d25;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* ================================
   HR Modal Styles
   ================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #1a4d2e;
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.8;
}

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

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    color: #1a4d2e;
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a4d2e;
}

.form-hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.btn-primary {
    background: #1a4d2e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #143d24;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
}

.btn-small:hover {
    background: #e0e0e0;
}

/* ==========================================
   ADDITIONAL MODAL FORM STYLES
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content.modal-small {
    max-width: 450px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a4d2e;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

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

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.form-section {
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 0.95rem;
    color: #1a4d2e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid #d4c5b0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a4d2e;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}

.btn-primary {
    background: #1a4d2e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #0f3820;
}

.btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #1a4d2e;
    border: 1px solid #1a4d2e;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f0f0f0;
}
