/* assets/style.css */
:root {
    --blue: #005B9C;
    --blue-light: #e3f2fd;
    --gray-bg: #f8f9fa;
    --gray-border: #e0e0e0;
    --text: #333;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--gray-bg);
    color: var(--text);
    line-height: 1.6;
}

/* Логотип */
.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    display: block;
    padding: 16px;
    text-align: center;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    transition: all 0.2s;
}
.logo:hover {
    color: #003d66;
}

/* Кнопки */
.btn {
    background-color: var(--blue);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn:hover {
    background-color: #004a80;
}
.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}
.btn-danger {
    background-color: #dc3545;
}
.btn-danger:hover {
    background-color: #c82333;
}
.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* Формы */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    font-size: 14px;
    margin: 6px 0;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0, 91, 156, 0.2);
}

/* Алерты */
.alert {
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f4f8;
}
.login-container {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 360px;
}
.login-container h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--blue);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid #005B9C;
}
.card.green { border-top-color: #28a745; }
.card.orange { border-top-color: #fd7e14; }
.card.blue { border-top-color: #17a2b8; }
.card.purple { border-top-color: #6f42c1; }
.card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

/* Таблица */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 16px;
}
th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-border);
}
th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #444;
}
tr:last-child td {
    border-bottom: none;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal:target {
    display: flex;
}
.modal-content {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    text-decoration: none;
    color: #999;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #333;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 14px;
}
