﻿* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.topbar {
    background: linear-gradient(135deg, #0f4c81, #1d7fc1);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .nav a {
        color: #fff;
        padding: 10px 14px;
        border-radius: 999px;
        font-weight: 600;
    }

        .nav a:hover,
        .nav .nav-btn {
            background: rgba(255, 255, 255, .18);
        }

.main {
    padding: 34px 0 54px;
}

.hero,
.card,
.page-title {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 14px 35px rgba(15, 76, 129, .10);
}

.hero {
    padding: 48px;
    margin-bottom: 26px;
    background: linear-gradient(135deg, #ffffff, #eaf6ff);
}

    .hero h1,
    .page-title h1 {
        margin: 0 0 12px;
        font-size: clamp(30px, 4vw, 46px);
        line-height: 1.15;
        color: #0f4c81;
    }

    .hero p,
    .page-title p {
        max-width: 780px;
        margin: 0 0 18px;
        color: #4b5563;
    }

.eyebrow {
    color: #1d7fc1 !important;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px !important;
}

.hero-actions,
.form-actions,
.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn,
input[type="submit"].btn {
    display: inline-block;
    border: none;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
    font-size: 15px;
}

    .btn.primary {
        background: #0f4c81;
        color: #fff;
    }

    .btn.secondary {
        background: #1d7fc1;
        color: #fff;
    }

    .btn.light {
        background: #eef2f7;
        color: #1f2937;
    }

    .btn:hover {
        transform: translateY(-1px);
        filter: brightness(.98);
    }

.grid {
    display: grid;
    gap: 26px;
}

.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    padding: 28px;
    margin-bottom: 26px;
}

    .card h2 {
        margin: 0 0 16px;
        color: #0f4c81;
        font-size: 25px;
    }

.page-title {
    padding: 30px;
    margin-bottom: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.function-tree {
    display: grid;
    gap: 14px;
}

.branch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.node {
    background: #eef7ff;
    border: 1px solid #c8e6ff;
    color: #0f4c81;
    padding: 14px;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
}

    .node.root {
        background: #0f4c81;
        color: #fff;
        font-size: 18px;
    }

.nice-list {
    padding-left: 20px;
}

    .nice-list li {
        margin: 8px 0;
    }

.table-responsive {
    overflow-x: auto;
}

.plain-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

    .plain-table th,
    .plain-table td,
    .data-table th,
    .data-table td {
        padding: 13px 14px;
        border-bottom: 1px solid #e5e7eb;
        text-align: left;
        vertical-align: top;
    }

    .plain-table th,
    .data-table th {
        background: #0f4c81;
        color: #fff;
        font-weight: 800;
    }

    .data-table tr:nth-child(even),
    .plain-table tr:nth-child(even) {
        background: #f8fafc;
    }

    .data-table tr:hover {
        background: #eef7ff;
    }

.link-edit {
    color: #0f4c81;
    font-weight: 800;
}

.link-delete {
    color: #dc2626;
    font-weight: 800;
}

.form-card {
    max-width: 920px;
}

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        font-weight: 800;
        margin-bottom: 8px;
        color: #374151;
    }

.input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

    .input:focus {
        border-color: #1d7fc1;
        box-shadow: 0 0 0 4px rgba(29, 127, 193, .12);
    }

.search {
    flex: 1;
    min-width: 260px;
}

.message {
    display: block;
    margin: 14px 0;
    color: #047857;
    font-weight: 800;
}

    .message.error,
    .validation {
        color: #dc2626;
        font-weight: 700;
    }

.footer {
    padding: 22px 0;
    background: #111827;
    color: #d1d5db;
    text-align: center;
}

@media (max-width: 820px) {
    .two-cols,
    .branch {
        grid-template-columns: 1fr;
    }

    .hero,
    .card,
    .page-title {
        padding: 22px;
    }

    .page-title {
        align-items: flex-start;
        flex-direction: column;
    }
    button {
        font-family: Arial, Helvetica, sans-serif !important;
    }
}
