:root {
    --bg-start: #f6f8fc;
    --bg-end: #e9eef8;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #dbe3ef;
    --primary: #2f67d8;
    --primary-hover: #2355b8;
    --danger: #d64545;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: linear-gradient(160deg, var(--bg-start), var(--bg-end));
}

.app-shell {
    max-width: 1040px;
    margin: 32px auto;
    padding: 0 16px;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(33, 63, 111, 0.08);
    padding: 24px;
}

.app-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 16px;
}

.app-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
}

.app-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.topbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.option-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #f4f7ff;
    border: 1px solid #d8e3ff;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.option-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(49, 93, 177, 0.15);
}

.option-tile h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.option-tile p {
    margin: 0;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.app-table th,
.app-table td {
    border-bottom: 1px solid var(--border);
    padding: 11px 12px;
    text-align: left;
    vertical-align: middle;
}

.app-table th {
    background: #eef3ff;
    color: #30466f;
    font-weight: 600;
}

.inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
}

.info-row {
    margin: 0;
    color: var(--muted);
}

.counter-result {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8faff;
}

.counter-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #224c9f;
}

.text-ok {
    color: #0f7a3d;
}

.text-error {
    color: #be3030;
}

.btn-danger-soft {
    background: var(--danger);
    color: #fff;
    border: none;
}

.btn-danger-soft:hover {
    background: #bf3636;
    color: #fff;
}

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

    .app-card {
        padding: 18px;
    }
}
