:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #111827;
    line-height: 1.6;
}

/* Bootstrap-friendly overrides */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Keep the app container but make it responsive with Bootstrap spacing */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Navbar tweaks to match Chronika's rounded look */
.navbar {
    background: rgba(255,255,255,0.82);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 0.35rem 0.75rem;
    backdrop-filter: blur(8px);
}
.navbar-brand {
    font-weight: 700;
    color: #4f46e5 !important;
}

/* Keep existing button styles but allow Bootstrap utilities to override when used */
.button, .button--ghost, .nav-links a.button {
    text-decoration: none;
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), transparent 35%),
                linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    background: rgba(255,255,255,0.82);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    backdrop-filter: blur(18px);
    margin-bottom: 24px;
}

.brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4f46e5;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Chronika modern button baseline */
.button,
.button--ghost,
.nav-links a.button {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 0.45rem;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
/*.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}*/

.button:hover,
button:hover {
    transform: translateY(-1px);
    background: #4338ca;
}

.button--ghost {
    background: transparent;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.button--danger {
    background: #ef4444;
}

.button--small {
    padding: 8px 14px;
    font-size: 0.95rem;
}

.content {
    min-height: 70vh;
}

.panel,
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.06);
    padding: 24px;
    margin-bottom: 24px;
}

.panel-header,
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.panel--hero {
    display: grid;
    gap: 18px;
}

.panel--small {
    max-width: 680px;
    margin-inline: auto;
}

.dashboard-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.compact-list,
.entry-list,
.media-grid {
    list-style: none;
    padding: 0;
    margin: 0;
}

.compact-list li,
.entry-card,
.media-card {
    border-top: 1px solid #f3f4f6;
    padding: 16px 0;
}

.compact-list li:first-child,
.entry-card:first-child,
.media-card:first-child {
    border-top: none;
}

.entry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.entry-meta,
.file-hint {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 8px 0 0;
}

.form-stack {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label.span-two,
.form-actions.span-two {
    grid-column: span 2;
}

label {
    display: grid;
    gap: 10px;
    font-size: 0.95rem;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    background: #f8fafc;
}

textarea {
    min-height: 220px;
    resize: vertical;
}

.file-upload input[type="file"] {
    border: none;
    background: transparent;
    padding: 0;
}

.file-hint {
    font-size: 0.9rem;
}

.alert {
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-weight: 500;
}

.alert--success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #d1fae5;
}

.alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.page-panel {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 160px);
}

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

.empty-state {
    text-align: center;
    padding: 40px 0;
}

.media-grid {
    display: grid;
    gap: 18px;
}

.media-card {
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 18px;
    display: grid;
    gap: 12px;
}

.media-card--preview img,
.media-card--preview video {
    width: 100%;
    border-radius: 16px;
    display: block;
}

.media-card--preview video {
    max-height: 320px;
}

.media-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    background: #f3f4f6;
    border-radius: 18px;
    color: #374151;
    font-weight: 700;
}

.footer {
    text-align: center;
    padding: 18px 0 0;
    color: #6b7280;
}

.password-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;

}

.password-input-group input {
    flex: 1;
    width: auto;
    min-width: 0;

}

.password-input-group button {
    min-width: 88px;
}

.form-note {
    text-align: center;
    margin-top: 14px;
}
.form-note a {
    color: #4f46e5;
}

@media (max-width: 900px) {
    .dashboard-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
