:root {
    color-scheme: light;
    /* Color Palette - Premium Modern */
    --primary: #16A34A;
    --primary-hover: #15803D;
    --secondary: #0F766E;
    --secondary-hover: #0F5F59;
    --danger: #EF4444;
    --danger-hover: #DC2626;
    --warning: #F59E0B;
    
    /* Light Mode */
    --bg-main: #F9FAFB;
    --bg-surface: #FFFFFF;
    --bg-surface-rgb: 255, 255, 255;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --border-color: #E5E7EB;
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html {
    color-scheme: light;
    background: #F9FAFB;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #F9FAFB;
        --bg-surface: #FFFFFF;
        --bg-surface-rgb: 255, 255, 255;
        --text-primary: #111827;
        --text-secondary: #4B5563;
        --border-color: #E5E7EB;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    color-scheme: light;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

input,
select,
textarea,
button {
    color-scheme: light;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}

/* Glassmorphism utility */
.glass {
    background: rgba(var(--bg-surface-rgb), 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    min-height: 38px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    max-width: 100%;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-surface);
    border-color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 0.875rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background-color: var(--bg-surface);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    min-width: 0;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
    min-width: 0;
}

.app-footer {
    padding: 1.25rem 1.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.app-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.app-footer-link:hover {
    transform: translateY(-1px);
    color: var(--primary);
    border-color: rgba(22, 163, 74, 0.28);
    box-shadow: var(--shadow-md);
}

.app-footer-logo {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
    display: block;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }

@media (max-width: 760px) {
    .card {
        border-radius: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        white-space: normal;
    }

    .flex {
        flex-wrap: wrap;
    }
}
