* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 30px 15px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    padding: 30px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

h1 {
    font-size: 1.6rem;
    color: #1a1a2e;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .2s;
}
.btn:hover { opacity: .85; }

.btn-add    { background: #4caf50; color: #fff; }
.btn-edit   { background: #2196f3; color: #fff; }
.btn-delete { background: #f44336; color: #fff; }
.btn-back   { background: #9e9e9e; color: #fff; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: .9rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.alert-error   { background: #ffebee; color: #c62828; border-left: 4px solid #f44336; }
.alert-error p { margin-bottom: 4px; }

/* Table */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

th {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 11px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

tr:hover td { background: #f9f9f9; }

.actions { white-space: nowrap; }
.actions .btn { margin-right: 6px; padding: 5px 12px; font-size: .82rem; }

.count {
    margin-top: 14px;
    font-size: .88rem;
    color: #666;
    text-align: right;
}

.empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* Form */
.form-card {
    max-width: 520px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .9rem;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .95rem;
    transition: border-color .2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33,150,243,.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
