@import "bootstrap-icons/font/bootstrap-icons.css";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-page: #FFFFFF;
    --bg-sidebar: #F8FAFC;
    --text-main: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    
    /* Green */
    --theme-marketing-bg: #E6F7F0;
    --theme-marketing-box: #F2FAF6;
    --theme-marketing-text: #059669;
    --theme-marketing-accent: #10B981;
    
    /* Orange */
    --theme-finance-bg: #FEF3C7;
    --theme-finance-box: #FFFBEB;
    --theme-finance-text: #D97706;
    --theme-finance-accent: #F59E0B;
    
    /* Blue */
    --theme-construction-bg: #E0EDFF;
    --theme-construction-box: #F0F6FF;
    --theme-construction-text: #2563EB;
    --theme-construction-accent: #3B82F6;

    /* Purple / Violet */
    --theme-purple-bg: #F3E8FF;
    --theme-purple-box: #FAF5FF;
    --theme-purple-text: #9333EA;
    --theme-purple-accent: #A855F7;

    /* Rose / Coral */
    --theme-rose-bg: #FFE4E6;
    --theme-rose-box: #FFF1F2;
    --theme-rose-text: #E11D48;
    --theme-rose-accent: #F43F5E;

    /* Dark Slate / Monochrome */
    --theme-dark-bg: #E2E8F0;
    --theme-dark-box: #F1F5F9;
    --theme-dark-text: #334155;
    --theme-dark-accent: #475569;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
}

/* Sidebar Layout */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid #E2E8F0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 3rem;
}

.sidebar-logo-icon {
    font-size: 1.75rem;
    color: #0F172A;
}

.logo-text h1 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background: #EDF2F7;
}

.nav-link.active {
    background: #E8F0FE;
    color: #1A73E8;
    font-weight: 600;
}

.nav-link i { font-size: 1.2rem; }

/* User Widget (Bottom Left) */
.user-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0 0 0;
    border-top: 1px solid #E2E8F0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1E293B;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info { flex: 1; }
.user-name { font-size: 0.875rem; font-weight: 600; color: var(--text-main); margin: 0; line-height: 1.2;}
.user-role { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

.user-dropdown-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
}

/* Main Content Area */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    padding: 2rem 4rem;
}

/* Top Right Header */
.top-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.notification-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    position: relative;
}

.notification-btn::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #EF4444;
    border-radius: 50%;
    border: 1px solid var(--bg-page);
}

.header-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    margin-bottom: 3.5rem;
}

.welcome-badge {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-section p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.6;
}

/* Project Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
}

.project-card {
    background: #FFFFFF;
    border-radius: 24px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border-color: #CBD5E1;
}

/* Card Header Art Layering */
.card-header-art {
    position: relative;
    width: 100%;
    height: 100px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border-radius: 18px;
    display: flex;
    align-items: center;
}

.blob-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    z-index: 1;
    opacity: 0.75;
}

.theme-marketing .blob-bg { background: var(--theme-marketing-bg); }
.theme-finance .blob-bg { background: var(--theme-finance-bg); }
.theme-construction .blob-bg { background: var(--theme-construction-bg); }
.theme-purple .blob-bg { background: var(--theme-purple-bg); }
.theme-rose .blob-bg { background: var(--theme-rose-bg); }
.theme-dark .blob-bg { background: var(--theme-dark-bg); }

/* Estate Watermark Background Art */
.estate-bg-art {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 5rem;
    line-height: 1;
    z-index: 2;
    opacity: 0.18;
    pointer-events: none;
    transform: rotate(-10deg);
}

.theme-marketing .estate-bg-art { color: var(--theme-marketing-text); }
.theme-finance .estate-bg-art { color: var(--theme-finance-text); }
.theme-construction .estate-bg-art { color: var(--theme-construction-text); }
.theme-purple .estate-bg-art { color: var(--theme-purple-text); }
.theme-rose .estate-bg-art { color: var(--theme-rose-text); }
.theme-dark .estate-bg-art { color: var(--theme-dark-text); }

.primary-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    font-size: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-marketing .primary-icon { color: var(--theme-marketing-text); }
.theme-finance .primary-icon { color: var(--theme-finance-text); }
.theme-construction .primary-icon { color: var(--theme-construction-text); }
.theme-purple .primary-icon { color: var(--theme-purple-text); }
.theme-rose .primary-icon { color: var(--theme-rose-text); }
.theme-dark .primary-icon { color: var(--theme-dark-text); }

.secondary-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.theme-marketing .secondary-icon { color: #10B981; }
.theme-finance .secondary-icon { color: #F59E0B; }
.theme-construction .secondary-icon { color: #3B82F6; }
.theme-purple .secondary-icon { color: #A855F7; }
.theme-rose .secondary-icon { color: #F43F5E; }
.theme-dark .secondary-icon { color: #64748B; }
    opacity: 0.85;
}

.theme-marketing .secondary-icon { color: #10B981; }
.theme-finance .secondary-icon { color: #F59E0B; }
.theme-construction .secondary-icon { color: #3B82F6; }

/* Card Content */
.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    flex: 1;
}

/* Quick Recap Box */
.quick-recap {
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.theme-marketing .quick-recap { background: var(--theme-marketing-box); }
.theme-finance .quick-recap { background: var(--theme-finance-box); }
.theme-construction .quick-recap { background: var(--theme-construction-box); }

.recap-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.theme-marketing .recap-header i { color: var(--theme-marketing-text); }
.theme-finance .recap-header i { color: var(--theme-finance-text); }
.theme-construction .recap-header i { color: var(--theme-construction-text); }

.recap-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.recap-item {
    display: flex;
    flex-direction: column;
}

.recap-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.recap-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.recap-trend {
    font-size: 0.65rem;
    font-weight: 500;
}
.recap-trend.up { color: #059669; }
.recap-trend.down { color: #DC2626; }
.recap-trend.neutral { color: var(--text-muted); }

/* CTA Bottom */
.card-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #F8FAFC;
    border-radius: 99px;
    text-decoration: none;
}

.cta-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.btn-circle-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.theme-marketing .btn-circle-action { background: var(--theme-marketing-text); }
.theme-finance .btn-circle-action { background: var(--theme-finance-text); }
.theme-construction .btn-circle-action { background: var(--theme-construction-text); }
.theme-purple .btn-circle-action { background: var(--theme-purple-text); }
.theme-rose .btn-circle-action { background: var(--theme-rose-text); }
.theme-dark .btn-circle-action { background: var(--theme-dark-text); }

.project-card:hover .btn-circle-action {
    transform: translateX(4px);
}

/* Login Page Styles */
.login-body {
    background-color: var(--bg-page);
    min-height: 100vh;
    display: block; /* Override default body display: flex */
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-split {
    display: flex;
    width: 100%;
    background: #ffffff;
    overflow: hidden;
}

.login-content-side {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    background: #ffffff;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-form-wrapper .form-control {
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.login-form-wrapper .form-control:focus {
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
    border-color: #86b7fe !important;
}

.login-form-wrapper .btn-primary {
    border-radius: 12px;
    padding: 0.8rem;
    font-weight: 600;
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

.login-form-wrapper .btn-primary:hover {
    background-color: #1e40af;
    border-color: #1e40af;
}

.login-visual-side {
    flex: 0 0 55%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    overflow: hidden;
}

/* Decorative blobs */
.login-visual-side::before,
.login-visual-side::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.login-visual-side::before {
    width: 600px;
    height: 600px;
    top: -10%;
    right: -10%;
}

.login-visual-side::after {
    width: 400px;
    height: 400px;
    bottom: -5%;
    left: -5%;
}

.visual-content {
    position: relative;
    z-index: 10;
    max-width: 480px;
    text-align: left;
}

.visual-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-group-custom {
    position: relative;
}

.input-group-custom i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    z-index: 10;
}

.input-group-custom .form-control {
    padding-left: 3rem;
}

@media (max-width: 992px) {
    .login-visual-side {
        display: none;
    }
    .login-content-side {
        flex: 1;
        padding: 2rem;
    }
    .login-wrapper {
        align-items: flex-start;
        padding-top: 10vh;
    }
}
