@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://maxst.icons8.com/vue-static/landings/line-awesome/font-awesome-line-awesome/css/all.min.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

/* ElCondominio Premium Design System - Light Joyful & Lively */
:root {
    /* Color Palette - Joyful & Lively */
    --color-primary: #FF6B6B; /* Vibrant Coral */
    --color-primary-hover: #FF5252;
    --color-secondary: #4ECDC4; /* Lively Turquoise */
    --color-secondary-hover: #45B7AF;
    --color-accent: #FFE66D; /* Sunny Yellow */
    --color-accent-hover: #FFD93D;
    
    /* Backgrounds */
    --bg-base: #F7F9FC; /* Soft, airy cool-white */
    --bg-surface: #FFFFFF; /* Crisp White */
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    
    /* Text Colors */
    --text-primary: #2D3436; /* Soft Dark Slate */
    --text-secondary: #636E72; /* Friendly Gray */
    --text-muted: #B2BEC3; /* Light Gray */
    
    /* Borders & Soft Depth */
    --border-color: #E6EAF0;
    --shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.04);
    --shadow-md: 0 8px 24px rgba(45, 52, 54, 0.08);
    --shadow-lg: 0 16px 40px rgba(45, 52, 54, 0.12);
    --shadow-glow: 0 10px 25px rgba(255, 107, 107, 0.35); /* Coral glow for primary actions */
    --shadow-glow-secondary: 0 10px 25px rgba(78, 205, 196, 0.35); /* Turquoise glow */
    
    /* Typography */
    --font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Radii - Friendly and Pill-like */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions - Bouncy and Playful */
    --transition-fast: 150ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-normal: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* CSS Reset & Baseline */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Premium UI Utilities */
.glass-panel {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

/* Button Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-family: var(--font-family);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-glow-secondary);
}

/* Bare Icon Buttons (Silhouette) */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}
.btn-icon.text-danger:hover {
    color: #d63031;
}
.btn-icon.text-info:hover {
    color: var(--color-secondary);
}

/* Form Elements */
.input-field {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.2);
}

/* Layout */
.app-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Custom 2-Column Layout */
.page-layout-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.page-layout-35-65 {
    display: grid;
    grid-template-columns: 35fr 65fr;
    gap: 2rem;
}

@media (max-width: 991px) {
    .page-layout-2-col, .page-layout-35-65 {
        grid-template-columns: 1fr;
    }
    
    .page-layout-2-col > .col-left {
        order: 2; /* Put list at bottom on mobile */
    }
    .page-layout-2-col > .col-right {
        order: 1; /* Put form at top on mobile */
    }
}

.page-layout-3-col {
    display: grid;
    grid-template-columns: 3fr 3fr 4fr;
    gap: 2rem;
}

@media (max-width: 1200px) {
    .page-layout-3-col {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .page-layout-3-col {
        grid-template-columns: 1fr;
    }
}

/* Standard Form Layouts */
.standard-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}
.standard-form > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.standard-form .form-actions {
    margin-top: auto; /* Pushes the button to the bottom if container grows */
    padding-top: 0.5rem;
}

/* Basic Flex Utilities */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.ms-2 { margin-left: 0.5rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }
.text-center { text-align: center; }
.fw-bold { font-weight: 700; }

/* Tables */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.table th, .table td { padding: 0.6rem 1rem; vertical-align: middle; text-align: left; }
.align-middle { vertical-align: middle; }

/* Alerts */
.alert { padding: 1rem 1.5rem; margin-bottom: 1.5rem; border-radius: var(--radius-md); font-weight: 500; }
.alert-danger { background-color: #ffe5e5; color: #d63031; border: 1px solid #ffcccc; }
.alert-success { background-color: #e5f9e5; color: #00b894; border: 1px solid #ccf2cc; }

/* Spinners */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.2em; }
.text-primary { color: var(--color-primary); }
@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Home Page Styles */
.home-container { padding: 2rem; }
.home-panel { padding: 4rem 2rem; text-align: center; margin-top: 3rem; }
.home-title { font-size: 3.5rem; color: var(--color-primary); margin-bottom: 1.5rem; letter-spacing: -0.05em; border: none !important; outline: none !important; box-shadow: none !important; text-shadow: none !important; }
.home-subtitle { font-size: 1.25rem; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.home-btn { font-size: 1.1rem; padding: 1rem 2rem; display: inline-block; text-decoration: none; }

@media (max-width: 768px) {
    .home-container { padding: 1rem; }
    .home-panel { padding: 2rem 1rem; margin-top: 1rem; }
    .home-title { font-size: 2.25rem; margin-bottom: 1rem; }
    .home-subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .home-btn { font-size: 1rem; padding: 0.85rem 1.5rem; }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #ffcfcf;
    color: #2D3436;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Global Startup Error Fallback */
.global-startup-error {
    color: white;
    padding: 20px;
    background-color: #d63031;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999999;
    width: 100%;
}