/* style.css - Autos Database */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
    --bg:        #0e0f13;
    --surface:   #16181f;
    --surface2:  #1e2029;
    --border:    #2a2d38;
    --accent:    #e8a838;
    --accent2:   #f0c060;
    --text:      #ecedf2;
    --text-muted:#8b8fa8;
    --error:     #e85555;
    --success:   #3ecf8e;
    --radius:    14px;
    --radius-sm: 8px;
    --shadow:    0 8px 40px rgba(0,0,0,0.5);
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(232,168,56,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(62,207,142,0.05) 0%, transparent 60%);
}

.page-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ── Card ────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
}

.wide-card {
    max-width: 680px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-header {
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    padding: 28px 32px 24px;
    text-align: center;
}

.logo-mark {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 0 12px rgba(232,168,56,0.4));
}

.card-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--accent);
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
}

.subtitle strong {
    color: var(--text);
    font-weight: 500;
}

.card-body {
    padding: 28px 32px;
}

.card-footer {
    padding: 0 32px 28px;
    display: flex;
    gap: 12px;
}

/* ── Typography ──────────────────────────────────── */
h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.link:hover { color: var(--accent2); }

/* ── Form ────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
    flex: 1;
}

.form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232,168,56,0.15);
}

input::placeholder {
    color: #3a3d4a;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    opacity: 0.6;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: #0e0f13;
}
.btn-primary:hover {
    background: var(--accent2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,168,56,0.3);
}

.btn-secondary {
    background: var(--surface2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--border);
    color: var(--text);
}

/* ── Messages ────────────────────────────────────── */
.error-msg {
    background: rgba(232,85,85,0.1);
    border: 1px solid rgba(232,85,85,0.3);
    color: var(--error);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 18px;
    font-weight: 500;
}

.success-msg {
    background: rgba(62,207,142,0.1);
    border: 1px solid rgba(62,207,142,0.3);
    color: var(--success);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 18px;
    font-weight: 500;
}

/* ── Autos Table ─────────────────────────────────── */
.autos-list {
    margin-top: 28px;
}

.no-data {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.88rem;
}

.autos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.autos-table thead th {
    text-align: left;
    padding: 8px 12px;
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.autos-table thead th:first-child { border-radius: 6px 0 0 0; }
.autos-table thead th:last-child  { border-radius: 0 6px 0 0; }

.autos-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.autos-table tbody tr:last-child td {
    border-bottom: none;
}

.autos-table tbody tr:hover td {
    background: rgba(232,168,56,0.04);
}

.autos-table tbody td:first-child {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 520px) {
    .card-header, .card-body { padding: 22px 20px; }
    .card-footer { padding: 0 20px 22px; }
    .form-row { flex-direction: column; }
    .wide-card { max-width: 100%; }
}
