*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Georgia', serif;
    background: #f7f3ee;
    color: #3a3028;
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
    padding: 3rem 2.5rem 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    border-top: 3px solid #c8a96e;
}

.logo {
    margin-bottom: 1.25rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: normal;
    letter-spacing: 0.04em;
    color: #3a3028;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #7a6a5a;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-group {
    text-align: left;
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7a6a5a;
    margin-bottom: 0.4rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d8cfc5;
    border-radius: 3px;
    font-size: 1rem;
    font-family: inherit;
    color: #3a3028;
    background: #faf8f5;
    transition: border-color 0.2s;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #c8a96e;
    background: #fff;
}

.error {
    background: #fdf0ee;
    color: #c0392b;
    border: 1px solid #f5c6c0;
    border-radius: 3px;
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    text-align: left;
}

.success {
    background: #eefdf4;
    color: #1e7e4a;
    border: 1px solid #b6f0d0;
    border-radius: 3px;
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    text-align: left;
}

.btn {
    width: 100%;
    padding: 0.8rem;
    background: #c8a96e;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s;
    margin-top: 0.25rem;
}

.btn:hover { background: #b8944f; }

.btn.btn-danger {
    background: #c0392b;
    width: auto;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}
.btn.btn-danger:hover { background: #a93226; }

.btn.btn-sm {
    width: auto;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

.help-text {
    margin-top: 1.75rem;
    font-size: 0.82rem;
    color: #a08060;
    line-height: 1.6;
}

.help-text a { color: #c8a96e; text-decoration: none; }
.help-text a:hover { text-decoration: underline; }

footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #b0a090;
}

footer a { color: #b0a090; }

/* ---- Admin styles ---- */
.admin-page {
    min-height: 100vh;
    background: #f7f3ee;
    padding: 2rem 1rem;
}

.admin-header {
    max-width: 800px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.4rem;
    color: #3a3028;
}

.admin-header a {
    font-size: 0.85rem;
    color: #7a6a5a;
    text-decoration: none;
}
.admin-header a:hover { text-decoration: underline; }

.admin-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.panel {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 1.75rem;
    border-top: 3px solid #c8a96e;
}

.panel h2 {
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 1.25rem;
    color: #3a3028;
    border-bottom: 1px solid #ede7df;
    padding-bottom: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 0.75rem;
    align-items: end;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a6a5a;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #ede7df;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid #f2ede8;
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

td a.url-link {
    color: #c8a96e;
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-all;
}
td a.url-link:hover { text-decoration: underline; }

.empty-state {
    text-align: center;
    color: #a08060;
    font-size: 0.9rem;
    padding: 1.5rem 0;
}
