* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 25px 0;
}

header {
    background: #1f2937;
    color: white;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    margin: 0 0 8px 0;
}

.card {
    background: white;
    padding: 22px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.buttons {
    display: flex;
    gap: 10px;
    align-items: end;
}

button {
    padding: 11px 18px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #1d4ed8;
}

button.danger {
    background: #dc2626;
}

button.danger:hover {
    background: #b91c1c;
}

.alert {
    padding: 14px;
    background: #dcfce7;
    color: #166534;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: bold;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th, td {
    padding: 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

th {
    background: #111827;
    color: white;
}

.list {
    padding-left: 22px;
    line-height: 1.9;
}

.fishbone {
    position: relative;
    min-height: 260px;
    padding: 25px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
}

.spine {
    position: absolute;
    top: 50%;
    left: 35px;
    right: 110px;
    height: 4px;
    background: #374151;
}

.head {
    position: absolute;
    top: calc(50% - 22px);
    right: 20px;
    padding: 12px;
    background: #2563eb;
    color: white;
    border-radius: 10px;
    font-weight: bold;
}

.bone {
    display: inline-block;
    margin: 12px;
    padding: 10px 14px;
    background: #eef2ff;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    position: relative;
    z-index: 2;
}

canvas {
    max-height: 360px;
}

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

    .buttons {
        flex-direction: column;
        align-items: stretch;
    }
}
