/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    background: #f5f5f0;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #5d4037;
    color: #fff;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    font-size: 0.9rem;
    opacity: 0.85;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.85;
}

.nav-link:hover { opacity: 1; }

.logout-form { display: inline; }
.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    font-size: 0.9rem;
    opacity: 0.85;
}
.logout-btn:hover { opacity: 1; }

/* Container */
.container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    width: 100%;
}

/* Flash messages */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.flash-error {
    background: #fde8e8;
    color: #991b1b;
    border: 1px solid #f5c6c6;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #5d4037;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: #8d6e63;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    color: #333;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: #5d4037;
    color: #fff;
}

.btn-primary:hover {
    background: #4e342e;
}

/* Login */
.login-wrap {
    max-width: 360px;
    margin: 4rem auto;
    text-align: center;
}

.login-wrap h1 {
    font-size: 1.5rem;
    color: #5d4037;
    margin-bottom: 1.5rem;
}

.login-form {
    text-align: left;
}

.login-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #555;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.login-form button {
    width: 100%;
    padding: 0.7rem;
    background: #5d4037;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

.login-form button:hover {
    background: #4e342e;
}

/* What's New */
.wn-entry { margin-bottom: 1.5rem; }
.wn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.wn-version {
    background: #5d4037;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
.wn-date {
    font-size: 0.85rem;
    color: #888;
}
.wn-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}
.wn-description p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #444;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 4rem;
    color: #5d4037;
    margin-bottom: 0.5rem;
}

.error-page p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #888;
    padding: 2rem;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #e0e0e0;
}

.footer-sep { margin: 0 0.5rem; }

.footer-link {
    color: #888;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .container { padding: 1rem 0.75rem; }
}
