:root {
    /* Color Palette - Lumina Solar Ethos (Stitch) */
    --primary: #042918;                /* Deep Forest / Primary Container */
    --primary-light: #436651;          /* Surface Tint */
    --accent: #F26522;                 /* Energy Orange */
    --accent-hover: #e0551c;
    --text-main: #151b2d;              /* On Surface / On Background */
    --text-muted: #414843;             /* On Surface Variant */
    --white: #ffffff;
    --bg-light: #faf8ff;               /* Surface / Background */
    --bg-dark: #020617;                /* Midnight Void */
    --card-bg: #ffffff;                /* Surface Container Lowest */
    --border: #c1c8c1;                 /* Outline Variant */
    --surface-dim: #d4d9f2;
    --inverse-surface: #2a3043;
    
    /* Shadows - low contrast for grounded infrastructure */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Spacing & Layout */
    --container-max: 1280px;           /* Updated per grid rules */
    --section-padding: 64px 24px;      /* margin-desktop & gutter */
    --radius-sm: 4px;                  /* Standard elements */
    --radius-lg: 8px;                  /* Large containers */
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    color: var(--primary);
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(90deg, var(--accent), #ff9a60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-orange {
    color: var(--accent);
}

.text-white { color: var(--white); }
.text-white-muted { color: #94a3b8; }

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 45px;
}

.portal-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
    padding-left: 15px;
    border-left: 1px solid var(--border);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

/* Hero Section */
.hero {
    padding: 140px 0;
    background: linear-gradient(to right, rgba(4, 41, 24, 0.9), rgba(2, 6, 23, 0.7)), url('../img/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    color: var(--white);
}

.hero h1 { 
    color: var(--white);
    text-shadow: 2px 2px 20px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.4);
    font-size: 4rem;
}
.hero p { 
    color: var(--white);
    text-shadow: 1px 1px 10px rgba(0,0,0,0.8);
    font-weight: 500;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(242, 101, 34, 0.05) 0%, transparent 70%);
    top: -200px;
    right: -200px;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(242, 101, 34, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 101, 34, 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid var(--white);
    margin-left: 15px;
    backdrop-filter: blur(10px);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
    text-shadow: none;
}

.btn-login {
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s;
    white-space: nowrap;
}

/* Sections */
.dashboard-section {
    padding: 100px 0;
}

.bg-light { background-color: #f1f5f2; } /* Soft Grey-Green */
.bg-dark { background-color: var(--bg-dark); }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Cards Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 25px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(242, 101, 34, 0.2);
}

.card-icon i, .card-icon svg {
    width: 32px !important;
    height: 32px !important;
}

.card-icon {
    font-size: 32px; /* For Emojis */
}

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

.card:hover .card-icon {
    background: var(--accent);
    color: var(--white);
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 25px;
}

.btn-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: gap 0.3s;
}

.card:hover .btn-card {
    color: var(--accent);
    gap: 15px;
}

/* Dark Cards */
.card-dark {
    background: #0f172a;
    border-color: #1e293b;
    color: var(--white);
}

.card-dark h3 { color: var(--white); }
.card-dark p { color: #94a3b8; }
.card-dark .card-icon { background: rgba(242, 101, 34, 0.1); color: var(--accent); }
.card-dark .btn-card { color: #94a3b8; }
.card-dark:hover { background: #1e293b; }

/* AI Section */
.ai-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0a192f 0%, #020617 100%);
    color: var(--white);
}

.ai-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.ai-text { flex: 1; }
.ai-visual { flex: 1; }

.badge {
    display: inline-block;
    background: rgba(242, 101, 34, 0.2);
    color: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.ai-features {
    list-style: none;
    margin: 30px 0;
}

.ai-features li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.ai-features i { color: var(--accent); }

.ai-card-preview {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ai-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg-bot {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    border-radius: 0 15px 15px 15px;
    align-self: flex-start;
    max-width: 80%;
}

.msg-user {
    background: var(--accent);
    padding: 12px 18px;
    border-radius: 15px 15px 0 15px;
    align-self: flex-end;
    max-width: 80%;
}

.typing::after {
    content: '...';
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Footer */
.main-footer {
    padding: 60px 0;
    background: var(--bg-dark);
    color: #94a3b8;
    border-top: 1px solid #1e293b;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    height: 35px;
    filter: brightness(0) invert(1);
    margin-bottom: 15px;
}

.footer-meta {
    display: flex;
    gap: 30px;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content h1 { font-size: 2.8rem; }
    .ai-container { flex-direction: column; text-align: center; }
    .ai-features li { justify-content: center; }
    .main-nav { display: none; }
    .footer-container { flex-direction: column; gap: 30px; text-align: center; }
}
