:root {
    /* Colors (Light Theme) */
    --bg-color: #f8f9fa;
    /* Light gray background */
    --sidebar-bg: #ffffff;
    /* White sidebar */
    --card-bg: #ffffff;
    /* White cards */
    --border-color: #dadce0;
    /* Light gray border */
    --text-primary: #202124;
    /* Dark gray text */
    --text-secondary: #5f6368;
    /* Medium gray text */

    /* Accents */
    --accent-color: #1a73e8;
    /* Google Blue */
    --accent-hover: #1557b0;
    /* Darker Blue */
    --success-color: #1e8e3e;
    /* Google Green */
    --error-color: #d93025;
    /* Google Red */
    --warning-color: #f9ab00;
    /* Google Yellow */

    /* Spacing & Sizing */
    --sidebar-width: 260px;
    --header-height: 60px;
    --border-radius: 8px;
    --card-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Google Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

/* ============================
   Layout
   ============================ */
.console-body {
    height: 100vh;
    overflow: hidden;
}

.console-layout {
    display: flex;
    height: 100%;
    position: relative;
    /* For mobile sidebar absolute positioning */
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    z-index: 50;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    font-weight: 500;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    color: var(--accent-color);
    background: #e8f0fe;
    /* Light blue hover */
}

.nav-item.active {
    color: var(--accent-color);
    background: #e8f0fe;
    /* Removed border-left for a cleaner look, or keep it if preferred */
}

/* ============================
   Responsiveness
   ============================ */
@media (max-width: 768px) {
    .console-layout {
        position: relative;
    }

    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-bar {
        padding: 0 1rem;
    }

    .landing-nav {
        padding: 1.5rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: none;
        /* Simplify for mobile for now, or add a toggle */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Toggle Switch */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        margin-right: 1rem;
    }
}

/* Sidebar Footer / User Profile */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem;
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-info .username {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.logout-btn {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.logout-btn:hover {
    color: var(--error-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-color);
}

.top-bar {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Adjusted for mobile menu button */
    padding: 0 2rem;
    background: var(--card-bg);
    /* Opaque white header */
    position: sticky;
    top: 0;
    z-index: 10;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.crumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================
   Dashboard Grid & Cards
   ============================ */

.dashboard-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for depth */
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.05);
}

.stat-icon.project {
    color: var(--accent-color);
    background: #e8f0fe;
}

.stat-icon.api {
    color: var(--warning-color);
    background: #ffeecf;
    /* Light orange */
}

.stat-icon.status {
    color: var(--success-color);
    background: #e6f4ea;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.stat-value.operational {
    font-size: 1.1rem;
    color: var(--success-color);
}

/* Content Sections */
.content-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.section-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Input Styles Update */
input,
select {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: none;
}


.btn-primary {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2ea043;
}


/* Projects Grid */
.mb-basic {
    margin-bottom: 1.5rem;
    /* Basic margin for spacing */
}

.create-project-form .form-group {
    margin-bottom: 1.5rem;
}

.create-project-form .btn-primary {
    width: 100%;
    justify-content: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-title {
    display: flex;
    gap: 12px;
}

.project-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-color), #2d7ff9);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.project-title h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.project-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge.active {
    background: #e6f4ea;
    /* Light green bg */
    color: var(--success-color);
    border: 1px solid #ceead6;
}

.detail-group {
    margin-bottom: 1rem;
}

.detail-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.secret-display,
.url-display {
    background: #f1f3f4;
    /* Very light gray */
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    color: var(--text-primary);
}

.url-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: var(--text-secondary);
}

.active .secret-display {
    color: var(--text-primary);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.copy-btn:hover {
    color: var(--accent-color);
}

.project-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: 1px solid transparent;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f1f3f4;
    color: var(--text-primary);
}

.btn-icon.danger:hover {
    background: #fce8e6;
    color: var(--error-color);
}

/* Documentation Styles */
.docs-header {
    text-align: center;
    margin-bottom: 3rem;
}

.docs-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #1a73e8, #4285f4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.docs-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.code-block {
    background: #282c34;
    /* Keep code blocks dark for contrast, standard practice */
    border: 1px solid #3e4451;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #abb2bf;
}

/* Base styles / Login */
.container {
    /* Keeping original styles for login page compatibility */
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
}

/* ============================
   Landing Page Styling
   ============================ */

.landing-page {
    background-color: #ffffff;
    /* Light theme for landing as per reference */
    color: #1f1f1f;
    font-family: 'Google Sans', 'Inter', sans-serif;
    /* Use Google Sans if available, fallback to Inter */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Landing Navigation */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1.25rem;
    color: #1f1f1f;
    text-decoration: none;
}

.landing-logo img {
    height: 24px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #444746;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #0b57d0;
}

/* Hero Section */
.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    /* Speckled background effect */
    /* Speckled background effect removed */
    opacity: 1;
}

/* Fade out the speckles at edges if desired, or keep full */

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
    font-weight: 500;
    color: #444746;
    font-size: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 400;
    /* Regular weight often looks cleaner for huge text */
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    color: #1f1f1f;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #444746;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn-hero {
    padding: 14px 28px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary {
    background-color: #1f1f1f;
    color: white;
    border: 1px solid #1f1f1f;
}

.btn-hero-primary:hover {
    background-color: #3e3e3e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-hero-secondary {
    background-color: transparent;
    color: #1f1f1f;
    border: 1px solid #e0e0e0;
}

.btn-hero-secondary:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

/* Footer (Landing) */
.landing-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    font-size: 0.875rem;
    color: #757575;
}

/* ============================
   Responsiveness (Landing)
   ============================ */

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1f1f1f;
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .landing-nav {
        padding: 1rem 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 1.5rem;
        flex-direction: column;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        z-index: 1000;
    }

    .nav-links-container.active {
        display: flex;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .nav-actions .btn-hero {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-hero {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* Particles/Decorations (Optional CSS based approach for the dots) */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.6;
}

/* ============================
   Auth Pages Styling (Light Theme)
   ============================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Google Sans', 'Inter', sans-serif;
    padding: 1rem;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 448px;
    /* Standard sign-in card width */
    padding: 2rem;
    /* Reduced padding slightly */
    border-radius: 8px;
    /* More rectangular, standard border radius */
    border: 1px solid #dadce0;
    /* Subtle Google-like border */
    /* Removed heavy shadow for a cleaner look, kept minimal alignment */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-brand {
    margin-bottom: 2rem;
    color: #1f1f1f;
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #202124;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    color: #5f6368;
    margin-bottom: 2rem;
}

/* Auth Input Overrides */
.auth-input-group {
    width: 100%;
    text-align: left;
    margin-bottom: 1rem;
}

.auth-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 1rem;
    color: #202124;
    background-color: #fff;
    transition: border 0.2s;
}

.auth-input:focus {
    border-color: #1a73e8;
    /* Google Blue */
    outline: none;
    box-shadow: none;
    /* Flat design */
}

/* Auth Select */
.auth-select {
    border: 1px solid #dadce0;
    border-radius: 4px;
    background-color: #fff;
    color: #202124;
    padding: 13px 10px;
    font-size: 1rem;
    cursor: pointer;
}

.auth-select:focus {
    border-color: #1a73e8;
    outline: none;
}

/* Phone Row - Side by Side */
.auth-phone-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.auth-phone-row .auth-select {
    width: 140px;
    /* Fixed width for prefix to maintain alignment */
    flex-shrink: 0;
}

.auth-phone-row .auth-input {
    flex: 1;
}

/* Auth Button */
.btn-auth {
    width: 100%;
    padding: 10px 24px;
    background-color: #1a73e8;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.btn-auth:hover {
    background-color: #1557b0;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.auth-footer-link {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #1f1f1f;
}

.auth-footer-link a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

.error-message {
    color: #d93025;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}