.container { max-width: 700px; margin: 0 auto; padding: 20px; }
h1 { color: #333; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px;
        overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 30px; }
.table-wrap { overflow-x: auto; margin-bottom: 30px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; white-space: nowrap; font-size: 13px; }
th { background: #2196F3; color: white; }
tr:hover { background: #f5f5f5; }
.btn { padding: 6px 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.btn-danger { background: #e53935; color: white; }
.btn-danger:hover { background: #c62828; }
.btn-primary { background: #2196F3; color: white; }
.btn-primary:hover { background: #1976D2; }
.add-form { background: white; padding: 20px; border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.add-form h2 { margin-top: 0; color: #333; }
.add-form input { padding: 10px; border: 1px solid #ddd; border-radius: 5px;
                  font-size: 14px; margin-right: 10px; width: 200px; }
.message { padding: 10px 15px; border-radius: 5px; margin-bottom: 15px; }
.message-success { background: #e8f5e9; color: #2e7d32; }
.message-error { background: #ffebee; color: #c62828; }

@media (max-width: 900px) {
    .container { padding: 12px; max-width: 100%; box-sizing: border-box; overflow-x: hidden; }
    .container table { display: block; width: 100%; max-width: 100%; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 20px; overflow: hidden; }
    .container table thead { display: none; }
    .container table tbody { display: block; width: 100%; }
    .container table tr { display: block; padding: 12px 14px; border-bottom: 1px solid #eee; }
    .container table tr:last-child { border-bottom: none; }
    .container table tr:hover { background: transparent; }
    .container table td { display: block; padding: 3px 0; border: none; font-size: 13px; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
    .container table td:empty { display: none; }
    .container table td[data-label]::before { content: attr(data-label) " : "; display: inline; font-weight: bold; color: #555; margin-right: 6px; text-transform: none; }
    .container table td:last-child { padding-top: 8px; }
    .container table td:last-child::before { display: block; margin-bottom: 4px; }
    .container table td:last-child .btn,
    .container table td:last-child a.btn,
    .container table td:last-child button { display: inline-block; width: auto; min-width: 0; padding: 6px 12px; margin: 4px 6px 0 0; font-size: 12px; white-space: nowrap; word-break: keep-all; box-sizing: border-box; }
    .container table td:last-child form { display: inline-block; margin: 0; }
    .add-form input,
    .add-form select,
    .add-form textarea { width: 100%; box-sizing: border-box; margin-right: 0; margin-bottom: 8px; min-width: 0 !important; }
    .add-form button { width: 100%; box-sizing: border-box; }
    .add-form form { display: flex; flex-direction: column; gap: 0; }
}
