/* =====================================================
   VIANHAKU.FI Design System
===================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --secondary: #263442;
    --secondary-hover: #344556;

    --light: #e7ebf0;
    --light-hover: #d4dae1;

    --bg-dark: #111820;
    --bg-panel: #ffffff;
    --bg-soft: #f2f4f7;
    --bg-header: #35475a;

    --text: #202833;
    --muted: #66717f;
    --border: #b8c0ca;

    --success: #238636;
    --danger: #c83232;
    --warning: #d18a00;

    --radius: 4px;
    --shadow: 0 1px 3px rgba(20, 30, 40, 0.16);
}

/* =====================================================
   Paneelit ja kortit
===================================================== */

.panel {
    padding: 20px;
    background: var(--bg-panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: 16px;
    background: var(--bg-panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.panel-title,
.section-title {
    margin: -20px -20px 18px;
    padding: 11px 14px;
    background: var(--bg-header);
    border-bottom: 1px solid #263544;
    color: white;
    font-size: 16px;
    font-weight: 800;
}

.empty {
    padding: 24px;
    background: var(--bg-soft);
    border: 1px dashed #9ca6b2;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

/* =====================================================
   Napit
===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px;
    border: 1px solid #174ea6;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s ease;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    border-color: #1a2632;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-light {
    background: var(--light);
    border-color: #aeb7c1;
    color: var(--text);
}

.btn-light:hover {
    background: var(--light-hover);
}

.btn-success {
    background: var(--success);
    border-color: #176b29;
}

.btn-danger {
    background: var(--danger);
    border-color: #9f2424;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid #2d3d4d;
    border-radius: var(--radius);
    background: #263442;
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.nav-btn:hover {
    background: #344556;
}

/* =====================================================
   Lomakkeet
===================================================== */

input,
textarea,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 11px;
    border: 1px solid #aeb7c1;
    border-radius: var(--radius);
    background: white;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

textarea {
    resize: vertical;
}

.field,
.form-group {
    margin-bottom: 14px;
}

.field label,
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #303b47;
    font-size: 13px;
    font-weight: 800;
}

/* =====================================================
   Ilmoitukset
===================================================== */

.success,
.alert-success,
.error,
.alert-error,
.warning,
.alert-warning,
.info,
.alert-info {
    padding: 11px 13px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
}

.success,
.alert-success {
    background: #e4f4e8;
    border: 1px solid #82bf91;
    color: #185b27;
}

.error,
.alert-error {
    background: #f9e5e5;
    border: 1px solid #d89a9a;
    color: #8c2020;
}

.warning,
.alert-warning {
    background: #fff4d6;
    border: 1px solid #ddb866;
    color: #755000;
}

.info,
.alert-info {
    background: #e4edf9;
    border: 1px solid #8caed9;
    color: #174d87;
}

/* =====================================================
   Tekstit
===================================================== */

.muted {
    color: var(--muted);
}

.title {
    color: var(--text);
    font-weight: 800;
}

.subtitle {
    color: var(--muted);
    line-height: 1.5;
}

/* =====================================================
   Tunnisteet ja tilat
===================================================== */

.badge,
.status {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-success,
.status-success {
    background: #e4f4e8;
    border-color: #82bf91;
    color: #185b27;
}

.badge-warning,
.status-warning {
    background: #fff4d6;
    border-color: #ddb866;
    color: #755000;
}

.badge-danger,
.status-danger {
    background: #f9e5e5;
    border-color: #d89a9a;
    color: #8c2020;
}

.badge-info,
.status-info {
    background: #e4edf9;
    border-color: #8caed9;
    color: #174d87;
}

/* =====================================================
   Taulukot
===================================================== */

.table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 12px;
    border-right: 1px solid #d5dae0;
    border-bottom: 1px solid #d5dae0;
    text-align: left;
    vertical-align: top;
}

th:last-child,
td:last-child {
    border-right: none;
}

th {
    background: #e4e8ed;
    color: #303b47;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

tbody tr:nth-child(even) {
    background: #f6f7f9;
}

tbody tr:hover {
    background: #eaf1f8;
}
/* =====================================================
   Gridit
===================================================== */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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