:root {
    --primary: #1a4d2e;
    --primary-light: #2d6a4f;
    --primary-dark: #0f3321;
    --accent: #f4a259;
    --accent-light: #f6b779;
    --danger: #c1121f;
    --warning: #ffa600;
    --success: #52b788;
    --bg-main: #faf9f6;
    --bg-card: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--bg-main) 0%, #f0ede5 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation Bar */
.nav-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 1rem 3rem;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
}

.user-role {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.btn-logout {
    background: rgba(193, 18, 31, 0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(193, 18, 31, 0.4);
}

.hidden {
    display: none !important;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem 3rem;
    box-shadow: 0 4px 20px var(--shadow);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-5%, -5%) scale(1.1); }
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    font-family: 'Amiri', serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: white;
}

/* Main Content */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

.stat-card.primary {
    border-right: 6px solid var(--primary);
}

.stat-card.success {
    border-right: 6px solid var(--success);
}

.stat-card.warning {
    border-right: 6px solid var(--warning);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.stat-trend {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Chart Card */
.chart-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.chart-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-dark);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
    cursor: pointer;
    transition: background 0.3s;
}

.data-table tbody tr:hover {
    background: rgba(26, 77, 46, 0.05);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: inline-block;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #74c69d 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-planning {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
}

.status-progress {
    background: rgba(255, 166, 0, 0.15);
    color: var(--warning);
}

.status-completed {
    background: rgba(82, 183, 136, 0.15);
    color: var(--success);
}

.status-delayed {
    background: rgba(193, 18, 31, 0.15);
    color: var(--danger);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 77, 46, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 46, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Project Details */
.project-header-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
    border-right: 6px solid var(--primary);
}

.project-title-section {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.meta-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px var(--shadow);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.team-list {
    list-style: none;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(26, 77, 46, 0.03);
    border-radius: 10px;
    transition: all 0.3s;
}

.team-member:hover {
    background: rgba(26, 77, 46, 0.08);
    transform: translateX(-5px);
}

.member-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.member-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Login Page */
.login-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    margin: 2rem auto;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

.error-message {
    background: rgba(193, 18, 31, 0.1);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-right: 4px solid var(--danger);
    display: none;
}

.error-message.show {
    display: block;
}

.demo-accounts {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.demo-accounts-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.demo-account {
    background: rgba(26, 77, 46, 0.05);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.demo-account:hover {
    background: rgba(26, 77, 46, 0.1);
    border-color: var(--primary);
}

.demo-account-role {
    color: var(--primary);
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-select {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .login-container {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.chart-card,
.section-card {
    animation: fadeInUp 0.6s ease backwards;
}

.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; }


