@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --primary-green: #006c35;
    --primary-green-dark: #004d26;
    --primary-green-light: #00a651;
    --accent-green: #008542;
    --light-green: #e8f5e9;
    --cream: #ffffff;
    --light-cream: #f8faf8;
    --black: #1a1a1a;
    --dark-gray: #2c2c2c;
    --text-gray: #555;
    --border-light: rgba(0, 108, 53, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 108, 53, 0.08);
    --shadow-md: 0 8px 30px rgba(0, 108, 53, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 108, 53, 0.15);
    --shadow-hover: 0 15px 40px rgba(0, 108, 53, 0.2);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #006c35 0%, #008542 50%, #00a651 100%);
    --gradient-hero: linear-gradient(135deg, #f0f7f2 0%, #ffffff 50%, #e8f5e9 100%);
    
    --primary-green: #006c35;
    --primary-green-dark: #004d26;
    --primary-green-light: #00a651;
    --accent-green: #008542;
    --light-green: #e8f5e9;
    --gradient-green: linear-gradient(135deg, #006c35 0%, #008542 50%, #004d26 100%);
}

* {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--light-cream);
    color: var(--black);
    overflow-x: hidden;
}

.section {
    flex: 1;
    padding: 4rem 1.5rem;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    min-height: 4.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.navbar-brand .navbar-item img {
    max-height: 55px !important;
    transition: var(--transition-fast);
}

.navbar-brand .navbar-item:hover img {
    transform: scale(1.05);
}

.navbar-item {
    color: var(--black) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: var(--transition-fast);
}

.navbar-item:hover {
    background: var(--light-green) !important;
    color: var(--accent-green) !important;
}

.hamburger-btn {
    background: var(--gradient-green);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    margin-left: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.hamburger-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-green) 0%, var(--accent-green) 100%);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    border-radius: 24px 0 0 24px;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    transition: var(--transition-fast);
}

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

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

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    border-radius: 0 16px 16px 0;
    margin: 0.25rem 0 0.25rem 1rem;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.15);
    padding-right: 2rem;
}

.sidebar-menu li a i {
    color: var(--cream);
    margin-left: 1rem;
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 1rem 1.5rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hero-section {
    background: var(--gradient-hero);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(253, 246, 227, 0.5) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.hero-logo {
    max-width: 280px;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
    filter: drop-shadow(0 10px 30px rgba(155, 89, 182, 0.2));
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.4s both;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.btn-primary {
    background: var(--gradient-green);
    color: white !important;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.btn-primary i {
    transition: var(--transition-fast);
}

.btn-primary:hover i {
    transform: translateX(-4px);
}

.btn-secondary {
    background: white;
    color: var(--primary-green) !important;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--primary-green);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--light-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.features-section {
    padding: 6rem 0;
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--black);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.feature-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-green);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--light-green);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition-smooth);
}

.feature-icon i {
    font-size: 2rem;
    color: var(--primary-green);
    transition: var(--transition-fast);
}

.feature-card:hover .feature-icon {
    background: var(--gradient-green);
    transform: scale(1.1) rotate(5deg);
}

.feature-card:hover .feature-icon i {
    color: white;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--text-gray);
    line-height: 1.8;
}

.box {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

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

.card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-header {
    background: var(--gradient-green);
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.card-header-title {
    color: white !important;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

.card-footer {
    border-top: 1px solid var(--border-light);
    background: var(--light-cream);
}

.card-footer-item {
    color: var(--primary-green);
    font-weight: 600;
    padding: 1rem;
    transition: var(--transition-fast);
}

.card-footer-item:hover {
    background: var(--light-green);
    color: var(--accent-green);
}

.button.is-primary {
    background: var(--gradient-green) !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.button.is-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button.is-green {
    background: var(--gradient-green);
    border: none;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.button.is-green:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.button.is-green .icon {
    color: var(--cream);
}

.button.is-light {
    background: white;
    border: 2px solid var(--border-light);
    color: var(--black);
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.button.is-light:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-2px);
}

.button.is-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    border: none !important;
    border-radius: 12px;
}

.button.is-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%) !important;
    border: none !important;
    color: white !important;
    border-radius: 12px;
}

.button.is-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    border: none !important;
    border-radius: 12px;
}

.button.is-info {
    background: var(--light-green) !important;
    border: none !important;
    color: var(--accent-green) !important;
    border-radius: 12px;
}

.input, .textarea, .select select {
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: white;
}

.input:focus, .textarea:focus, .select select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(155, 89, 182, 0.1);
    outline: none;
}

.input:hover, .textarea:hover {
    border-color: var(--primary-green-light);
}

.label {
    color: var(--black);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.title {
    color: var(--black);
    font-weight: 700;
}

.subtitle {
    color: var(--text-gray);
}

a {
    color: var(--primary-green);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-green);
}

.notification {
    border-radius: 16px;
    border: none;
    padding: 1.25rem 1.5rem;
}

.notification.is-success {
    background: linear-gradient(135deg, #d4efdf 0%, #e8f8f5 100%);
    color: #1e8449;
}

.notification.is-danger {
    background: linear-gradient(135deg, #fadbd8 0%, #fdedec 100%);
    color: #c0392b;
}

.notification.is-info.is-light {
    background: var(--light-green) !important;
    color: var(--black) !important;
}

.notification.is-primary.is-light {
    background: var(--light-green) !important;
    color: var(--black) !important;
}

.tag {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.tag.is-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.tag.is-warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: white;
}

.footer {
    background: var(--black);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 1.5rem;
    margin-top: auto;
}

.footer a {
    color: var(--cream);
}

.footer a:hover {
    color: white;
}

.auth-container {
    min-height: calc(100vh - 4.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--gradient-hero);
}

.auth-box {
    background: white;
    border-radius: 32px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--black);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-welcome {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--black);
}

.dashboard-welcome span {
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-green);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-card-body {
    padding: 2rem;
}

.project-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1rem;
}

.project-card-footer {
    display: flex;
    border-top: 1px solid var(--border-light);
}

.project-card-footer a {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--primary-green);
    transition: var(--transition-fast);
}

.project-card-footer a:hover {
    background: var(--light-green);
}

.project-card-footer a:first-child {
    border-left: 1px solid var(--border-light);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--light-green);
    border-radius: 24px;
    border: 2px dashed var(--primary-green-light);
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.empty-state-icon i {
    font-size: 2.5rem;
    color: var(--primary-green);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

pre {
    background: var(--light-cream);
    padding: 1.5rem;
    border-radius: 16px;
    overflow-x: auto;
    font-size: 0.9rem;
    border: 1px solid var(--border-light);
}

.breadcrumb {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.table {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.table th {
    background: var(--light-green);
    color: var(--black);
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

[data-theme="dark"] body {
    background: #0f0f0f;
    color: #e0e0e0;
}

[data-theme="dark"] .navbar {
    background: rgba(20, 20, 20, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar-item {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .navbar-item:hover {
    background: rgba(155, 89, 182, 0.2) !important;
    color: var(--primary-green-light) !important;
}

[data-theme="dark"] .section {
    background: #0f0f0f;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 50%, #1f1a24 100%);
}

[data-theme="dark"] .hero-title {
    color: #e0e0e0;
}

[data-theme="dark"] .hero-subtitle {
    color: #a0a0a0;
}

[data-theme="dark"] .features-section {
    background: #1a1a1a;
}

[data-theme="dark"] .section-title {
    color: #e0e0e0;
}

[data-theme="dark"] .feature-card {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .feature-title {
    color: #e0e0e0;
}

[data-theme="dark"] .box, [data-theme="dark"] .auth-box {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card-footer {
    background: #151515;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .project-card {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .project-card-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .title {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .subtitle {
    color: #a0a0a0 !important;
}

[data-theme="dark"] .label {
    color: #d0d0d0;
}

[data-theme="dark"] .input,
[data-theme="dark"] .textarea,
[data-theme="dark"] .select select {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

[data-theme="dark"] .notification.is-info.is-light {
    background: rgba(155, 89, 182, 0.15) !important;
    border-color: rgba(155, 89, 182, 0.3);
    color: #e0e0e0 !important;
}

[data-theme="dark"] pre {
    background: #1f1f1f;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer {
    background: #0a0a0a;
}

[data-theme="dark"] .empty-state {
    background: rgba(155, 89, 182, 0.1);
    border-color: rgba(155, 89, 182, 0.3);
}

[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 50%, #1f1a24 100%);
}

[data-theme="dark"] .dashboard-header {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .breadcrumb {
    background: #1f1f1f;
}

[data-theme="dark"] .table th {
    background: rgba(155, 89, 182, 0.2);
}

[data-theme="dark"] .table {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card-content {
    background: #1f1f1f;
}

[data-theme="dark"] .card-content p,
[data-theme="dark"] .card-content .content {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .box p,
[data-theme="dark"] .box .content,
[data-theme="dark"] .box li {
    color: #d0d0d0 !important;
}

[data-theme="dark"] .box h4,
[data-theme="dark"] .box h3 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .dashboard-welcome {
    color: #e0e0e0;
}

[data-theme="dark"] .project-card-title {
    color: #e0e0e0;
}

[data-theme="dark"] .project-card-body p {
    color: #b0b0b0;
}

[data-theme="dark"] .empty-state-title {
    color: #e0e0e0;
}

[data-theme="dark"] .empty-state-desc {
    color: #a0a0a0;
}

[data-theme="dark"] .table td {
    color: #d0d0d0;
    background: #1a1a1a;
}

[data-theme="dark"] .table tr:nth-child(even) td {
    background: #1f1f1f;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .auth-box {
        padding: 2rem;
        border-radius: 24px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
