* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.container {
    width: 94%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0 50px;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #123b66;
    font-size: 32px;
}

h2 {
    margin-top: 30px;
    color: #234f7d;
}

h3 {
    color: #234f7d;
}

p {
    line-height: 1.5;
}

a {
    color: #1769aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ------------------------------
   Карточки
------------------------------ */

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}


/* ------------------------------
   Кнопки
------------------------------ */

.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 7px;
    background: #1769aa;
    color: white;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: #12578e;
    text-decoration: none;
}

.btn-secondary {
    background: #64748b;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    background: #c0392b;
}

.btn-danger:hover {
    background: #a93226;
}


/* ------------------------------
   Таблицы
------------------------------ */

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

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #e8f1fa;
    color: #123b66;
    text-align: left;
    font-weight: 600;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid #dce3ea;
}

tr:hover td {
    background: #f8fafc;
}


/* ------------------------------
   Формы
------------------------------ */

input,
select {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    margin-top: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: white;
    font-size: 15px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #1769aa;
    box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

button {
    font-family: inherit;
}


/* ------------------------------
   Статусы
------------------------------ */

.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-draft {
    background: #fff3cd;
    color: #7a5b00;
}

.status-submitted {
    background: #d9f2e3;
    color: #17663a;
}


/* ------------------------------
   Служебные элементы
------------------------------ */

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

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.actions form {
    margin: 0;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
}


/* ------------------------------
   Телефон / небольшой экран
------------------------------ */

@media (max-width: 700px) {

    .container {
        width: 92%;
        padding-top: 20px;
    }

    .page-header {
        display: block;
    }

    .page-header .btn {
        margin-top: 10px;
    }

    h1 {
        font-size: 26px;
    }

    th,
    td {
        padding: 9px;
        font-size: 14px;
    }
}
.topbar {
    background: #123b66;
    color: white;
}

.topbar-inner {
    width: 94%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.brand {
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.brand:hover {
    color: white;
    text-decoration: none;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-user a {
    color: white;
}

.topbar-user a:hover {
    color: white;
}


/* ------------------------------
   Главная панель
------------------------------ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.dashboard-card {
    display: block;

    background: white;
    border-radius: 12px;

    padding: 26px;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);

    color: #1f2937;
    text-decoration: none;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.10);

    text-decoration: none;
}

.dashboard-icon {
    font-size: 34px;
    margin-bottom: 15px;
}

.dashboard-card h2 {
    margin: 0 0 8px;
    font-size: 21px;
    color: #123b66;
}

.dashboard-card p {
    margin: 0;
    color: #64748b;
}


/* Главная карточка соревнований */

.dashboard-card-primary {
    background: #1769aa;
    color: white;
}

.dashboard-card-primary h2 {
    color: white;
}

.dashboard-card-primary p {
    color: #e6f1fa;
}


/* ------------------------------
   Адаптация панели
------------------------------ */

@media (max-width: 800px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        width: 92%;
    }

    .topbar-user {
        gap: 10px;
        font-size: 14px;
    }
}
/* ------------------------------
   Формы
------------------------------ */

.card form p {
    margin-top: 0;
    margin-bottom: 22px;
}

.card form label {
    display: inline-block;
    margin-bottom: 5px;
    color: #334155;
}

.card form input,
.card form select {
    margin-top: 6px;
}

.card form .actions {
    margin-top: 28px;
}

/* ------------------------------
   Сетка формы спортсмена
------------------------------ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 800px;
}

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

.form-grid .form-group {
    margin-bottom: 0;
}

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

.form-group input,
.form-group select {
    width: 100%;
    max-width: none;
    margin: 0;
}

.form-hint {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 13px;
}

.form-section {
    max-width: 800px;
    margin-top: 22px;
}

.optional {
    color: #64748b;
    font-weight: normal;
    font-size: 13px;
}

@media (max-width: 700px) {

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------
   Заявка на соревнование
------------------------------ */

.competition-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #475569;
}

.competition-info-item {
    display: flex;
    gap: 7px;
    align-items: center;
}

.submission-card {
    border-left: 5px solid #d6a400;
}

.submission-card-submitted {
    border-left-color: #27905a;
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.submission-header h2 {
    margin: 0;
}

.submission-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.submission-details p {
    margin: 0;
}

.notice {
    padding: 14px 16px;
    border-radius: 8px;
    background: #eef5fb;
    color: #334155;
    margin-top: 16px;
}

.notice-success {
    background: #e7f6ed;
    color: #17663a;
}

.notice-warning {
    background: #fff7db;
    color: #745900;
}

.btn-success {
    background: #27905a;
}

.btn-success:hover {
    background: #207849;
}

@media (max-width: 700px) {

    .submission-header {
        display: block;
    }

    .submission-header .status {
        margin-top: 10px;
    }

    .competition-info,
    .submission-details {
        gap: 12px;
        flex-direction: column;
    }
}
/* ------------------------------
   Выбор дисциплин спортсмена
------------------------------ */

.athlete-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.summary-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 14px 16px;
}

.summary-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 13px;
}

.summary-value {
    font-weight: 600;
    color: #1f2937;
}

.event-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.entry-time {
    width: 130px;
    max-width: 130px;
    margin: 0;
    text-align: center;
    font-family: monospace;
    font-size: 15px;
}

.event-selected td {
    background: #f1f8fd;
}

.time-help {
    margin-top: 18px;
    padding: 13px 16px;
    background: #eef5fb;
    border-radius: 8px;
    color: #475569;
}

.save-panel {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 22px;
}

@media (max-width: 800px) {

    .athlete-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
/* ------------------------------
   Компактные кнопки
------------------------------ */

.btn-small {
    padding: 8px 12px;
    font-size: 13px;
}

.btn-outline {
    background: white;
    color: #1769aa;
    border: 1px solid #1769aa;
}

.btn-outline:hover {
    background: #eef5fb;
    color: #12578e;
}

.file-name {
    color: #64748b;
    font-size: 13px;
    word-break: break-word;
}
/* ------------------------------
   Сводка администратора
------------------------------ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.stat-label {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: #123b66;
    font-size: 28px;
    font-weight: 700;
}

.export-card {
    border-left: 5px solid #1769aa;
}

.export-card-ready {
    border-left-color: #27905a;
}

.export-card h2 {
    margin-top: 0;
}

@media (max-width: 900px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ------------------------------
   Страница входа
------------------------------ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: #f4f7fb;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: #1769aa;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.login-brand h1 {
    margin: 0 0 6px;
    font-size: 32px;
}

.login-brand p {
    margin: 0;
    color: #64748b;
}

.login-card {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-card h2 {
    margin-top: 0;
    margin-bottom: 24px;
    text-align: center;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card input {
    width: 100%;
    max-width: none;
    margin: 0;
}

.login-button {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    font-size: 16px;
}

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fdeaea;
    color: #9f2d25;
    font-size: 14px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}