/* Все на лёд — MVP styles */
/* Colors from Alpha Patriot jersey: white + gold + dark */
:root {
    --gold: #C5A028;
    --gold-light: #D4B94E;
    --gold-dark: #A68620;
    --gold-bg: #FBF7EC;
    --dark: #1C2331;
    --dark-light: #2C3547;
    --green: #27ae60;
    --red: #D9534F;
    --gray: #7f8c8d;
    --gray-light: #ecf0f1;
    --white: #ffffff;
    --text: #1C2331;
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--gold-bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--dark);
    color: var(--white);
    padding: 12px 20px;
    border-bottom: 4px solid var(--gold);
}

.header h1 {
    font-size: 1.3rem;
    margin-bottom: 1px;
    color: var(--gold);
}

.header p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(28,35,49,0.08);
    border: 1px solid rgba(197,160,40,0.15);
}

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

.card h2 {
    font-size: 1.1rem;
    color: var(--dark);
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--gold);
}

/* Training card on index */
.training-card {
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.training-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(28,35,49,0.14);
}

.training-date {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.training-day {
    font-size: 0.95rem;
    color: var(--gray);
}

.training-time {
    font-size: 1.1rem;
    font-weight: 600;
}

.training-stats {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Team line */
.team-line {
    margin-bottom: 16px;
}

.team-line h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark);
}

.slots-info {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray);
}

.slot-list {
    list-style: none;
}

.slot-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 1rem;
    min-height: 36px;
}

.slot-item.slot-just-added {
    animation: slotAppear 0.4s ease-out;
    background: rgba(197,160,40,0.1);
    border-radius: 6px;
    margin: 0 -4px;
    padding: 6px 4px;
}

@keyframes slotAppear {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.slot-number {
    width: 28px;
    font-weight: 600;
    color: var(--gold-dark);
    flex-shrink: 0;
}

.slot-name {
    flex: 1;
    font-weight: 500;
}

.slot-empty {
    color: var(--gray-light);
}

.slot-item-dots {
    border-bottom: none;
    padding: 2px 0 4px;
}

.slot-dots {
    color: var(--gray-light);
    font-size: 1.1rem;
    letter-spacing: 3px;
    padding-left: 4px;
}

.slot-goalie {
    color: var(--gold-dark);
    font-weight: 700;
}

.goalie-badge {
    background: var(--gold);
    color: var(--white);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
}

.cancel-btn {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-open {
    background: #d5f5e3;
    color: var(--green);
}

.badge-closed {
    background: #fadbd8;
    color: var(--red);
}

.badge-full {
    background: #fdebd0;
    color: var(--gold-dark);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

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

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    width: 100%;
    font-family: inherit;
    transition: opacity 0.15s;
}

.btn:active {
    opacity: 0.8;
}

.btn-primary {
    background: var(--dark);
    color: var(--gold);
}

.btn-success {
    background: var(--gold);
    color: var(--white);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    width: auto;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--dark);
    color: var(--dark);
}

/* Registration form */
.register-form {
    background: linear-gradient(135deg, rgba(197,160,40,0.08), rgba(28,35,49,0.04));
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    border: 2px solid rgba(197,160,40,0.25);
}

.register-form h3 {
    border: none;
    color: var(--dark);
    margin-bottom: 12px;
}

.line-select {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.line-select label {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.line-select input[type="radio"] {
    display: none;
}

.line-select label.selected {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--white);
}

.line-select label.full {
    opacity: 0.5;
    pointer-events: none;
}

/* Error / Success messages */
.error-msg {
    background: #fadbd8;
    color: var(--red);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-weight: 500;
}

.success-msg {
    background: #d5f5e3;
    color: var(--green);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-weight: 500;
    animation: fadeOut 3s ease-out 1s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* Login card — centered in container */
.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    max-width: 380px;
    margin: 32px auto 0;
    box-shadow: 0 2px 16px rgba(28,35,49,0.10);
    border: 1px solid rgba(197,160,40,0.25);
    border-top: 3px solid var(--gold);
}

.pin-input {
    text-align: center;
    font-size: 2rem !important;
    letter-spacing: 8px;
    font-weight: 700;
}

/* Admin */
.admin-header {
    background: var(--dark-light);
    border-bottom-color: var(--gold-dark);
}

.admin-nav {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.admin-nav a {
    color: var(--gold-light);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
}

.admin-nav a:hover {
    opacity: 1;
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.admin-reg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
    flex-wrap: wrap;
}

.admin-reg-name {
    flex: 1;
    font-weight: 500;
    min-width: 100px;
}

/* Audit log */
.audit-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.85rem;
}

.audit-time {
    color: var(--gray);
    font-size: 0.8rem;
}

.audit-action {
    font-weight: 600;
}

/* Checkbox styled */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--gold-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Gold stripe decoration */
.gold-stripe {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 8px 0;
}

/* Header burger menu */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.burger-wrap {
    position: relative;
}

.burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 8px;
    transition: background 0.15s;
}

.burger-btn:hover,
.burger-btn.active {
    background: rgba(197,160,40,0.15);
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.2s;
    transform-origin: center;
}

.burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.burger-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    min-width: 220px;
    z-index: 100;
    overflow: hidden;
    border: 1px solid rgba(197,160,40,0.2);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0s linear 0.15s;
    pointer-events: none;
}

.burger-menu.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.15s, transform 0.15s, visibility 0s;
    pointer-events: auto;
}

.burger-item {
    display: block;
    padding: 14px 20px;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.1s, color 0.1s;
    border-left: 3px solid transparent;
}

.burger-item:hover {
    background: var(--gold-bg);
    border-left-color: var(--gold);
    color: var(--gold-dark);
}

.burger-item-danger {
    color: var(--red);
}

.burger-item-danger:hover {
    background: #fadbd8;
    border-left-color: var(--red);
    color: var(--red);
}

.burger-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 4px 0;
}

/* Index card: goalies and total */
.index-goalies {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.index-goalies-icon {
    font-size: 1rem;
}

.index-total {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Goalies row in training header card */
.goalies-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(197,160,40,0.08);
    border-radius: var(--radius);
    border: 1px solid rgba(197,160,40,0.25);
    flex-wrap: wrap;
}

.goalies-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.goalies-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.goalies-empty {
    color: var(--gray);
    font-size: 0.9rem;
    font-style: italic;
}

.goalie-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--white);
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

.goalie-chip.slot-just-added {
    animation: slotAppear 0.4s ease-out;
}

.goalie-name {
    white-space: nowrap;
}

.goalie-cancel {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.goalie-x {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 2px;
    font-weight: 700;
}

.goalie-x:hover {
    color: #B03A38;
}

/* Responsive */
@media (max-width: 400px) {
    .container {
        padding: 10px;
    }
    .line-select {
        flex-direction: column;
    }
}
