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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 28px;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Главная страница */
.main-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.main-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.main-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.main-btn .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.btn-event     { background: linear-gradient(135deg, #e91e63, #c2185b); }
.btn-repair    { background: linear-gradient(135deg, #ff9800, #f57c00); }
.btn-cartridge { background: linear-gradient(135deg, #4caf50, #388e3c); }
.btn-video     { background: linear-gradient(135deg, #2196f3, #1565c0); }

/* Форма */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.form-card h2 {
    margin-bottom: 24px;
    color: #1a237e;
    font-size: 24px;
}

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

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

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a237e;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

.checkbox-group label:hover {
    border-color: #1a237e;
    background: #f5f5ff;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a237e;
}

.btn-submit {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    opacity: 0.9;
}

.btn-back {
    display: inline-block;
    margin-bottom: 20px;
    color: #1a237e;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.btn-back:hover {
    text-decoration: underline;
}

/* Админка */
.table-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table-card h2 {
    margin-bottom: 20px;
    color: #1a237e;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

th {
    background: #f5f5f5;
    font-weight: 700;
    color: #333;
}

tr:hover {
    background: #fafafa;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge-new         { background: #2196f3; }
.badge-in_progress { background: #ff9800; }
.badge-done        { background: #4caf50; }
.badge-cancelled   { background: #9e9e9e; }

.badge-event     { background: #e91e63; }
.badge-repair    { background: #ff9800; }
.badge-cartridge { background: #4caf50; }
.badge-video     { background: #2196f3; }

.filter-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

select.status-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.delete-btn {
    background: #e53935;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.delete-btn:hover {
    background: #c62828;
}

@media (max-width: 600px) {
    .main-buttons {
        grid-template-columns: 1fr;
    }
}
/* === Страница входа === */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #e53935;
}
.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #4caf50;
}