/* === Gilroy Font Family (optimized set) === */

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Thin.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-Thin.woff") format("woff");
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-UltraLight.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-UltraLight.woff") format("woff");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Light.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Regular.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Medium.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Semibold.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-SemiBold.woff") format("woff");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Bold.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Extrabold.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-ExtraBold.woff") format("woff");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-Black.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-Black.woff") format("woff");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* === Италики (опционально) === */

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-RegularItalic.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-RegularItalic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Gilroy";
    src: url("/assets/fonts/Gilroy-BoldItalic.woff2") format("woff2"),
        url("/assets/fonts/Gilroy-BoldItalic.woff") format("woff");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}


:root {
    --bg: #f6f7fb;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #00876f;
    --primary-600: #208b50;
    --primary-50: #eef3ff;
    --danger: #b91c1c;
    --danger-50: #fff5f5;
    --card: #ffffff;
    --border: #e8ecf7;
    --border-strong: #dfe6f7;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 8px 24px rgba(20, 32, 77, .06), 0 1px 1px rgba(20, 32, 77, .03);
    --gap-xs: 6px;
    --gap-sm: 10px;
    --gap: 14px;
    --gap-lg: 18px;
    --h-input: 44px;
    --fs: 15px;
    --fs-sm: 13px
}

* {
    box-sizing: border-box
}

body {
    margin: 20px;
    background: var(--bg);
    color: var(--text);
    font: 400 var(--fs, 15px)/1.5 "Gilroy", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px 0 24px;
}

.header-panel {
    background: var(--card);
    border-bottom: 15px solid #00876f;
    box-shadow: var(--shadow);
    border-radius: 14px 14px 0 0;
    display: flex;
    padding: 25px;
    justify-content: space-between;
}

.logo {
    object-fit: contain;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em
}

.user-link {
    text-decoration: none;
    color: #64748b;
    font-size: 15px; 
    font-weight: 500;       
}


.topbar-link {
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid #00876f;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #00876f;
    display: block;
    width: 160px;
}

.topbar-link:hover{
    border: 2px solid #00876f;
    color: #ffffff;
    background: #00876f;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: var(--gap)
}

.card--section {
    padding: 16px
}

.grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--gap)
}

@media(max-width:960px) {
    .grid {
        grid-template-columns: 1fr
    }
}

label {
    display: block;
    font-size: var(--fs-sm);
    color: #475569;
    margin: 6px 0 4px
}

.input,
input[type=text],
input[type=email],
input[type=tel],
input[type=password],
select {
    width: 100%;
    height: var(--h-input);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcff;
    outline: none;
    font-size: var(--fs)
}

.input:focus,
input:focus,
select:focus {
    border-color: #cdd9ff;
    box-shadow: 0 0 0 4px rgba(38, 68, 167, .08)
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap)
}

.form-row--3 {
    grid-template-columns: 1fr 1fr 1fr
}

.fullrow {
    grid-column: 1/-1
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--h-input);
    padding: 0 16px;
    margin: 5px 0 5px 0;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: filter .15s ease, transform .02s ease;
    user-select: none;
}

.btn:active {
    transform: translateY(.5px)
}

.btn-primary {
    background: linear-gradient(180deg, var(--primary), var(--primary-600));
    color: #fff;
    border-color: var(--primary-600);
    font-family: "Gilroy";
    font-weight: 600;
    font-size: var(--fs);
}

.btn-primary:hover {
    filter: brightness(1.04)
}

.btn-secondary {
    background: var(--primary-50);
    border: 1px solid #d8e2ff;
    color: #1b2b7a;
    height: 40px;
    font-family: "Gilroy";
    font-weight: 600;
    font-size: var(--fs);
}

.btn-danger {
    background: #fff;
    border: 1px solid #ffdcdc;
    color: var(--danger);
    height: 40px;
    font-family: "Gilroy";
    font-weight: 600;
    font-size: var(--fs);
}

.btn-danger:hover {
    background: var(--danger-50)
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: #f4fff6;
    border: 1px solid #208b50;
    color: #208b50;
    font-weight: 600;
    text-decoration: none;
    height: auto
}

.btn-link:hover {
    background: #d1f7d8
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px;
    color: #208b50;
    font-weight: 600;
    text-decoration: none;
    height: auto;
    border: none;
    background: none;

}

.btn-action:hover {}


.event-create {
    display: flex;
    gap: var(--gap-sm);
    align-items: center;
    padding: 14px
}

.event-create .input {
    flex: 1 1 auto;
    min-width: 260px
}

.table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0
}

.table thead th {
    text-align: left;
    font-size: 12.5px;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #475569;
    background: #f3f3f3;
    border-bottom: 1px solid var(--border-strong);
    padding: 12px
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs)
}

.table tbody tr:hover {
    background: #fcfcfc
}

table td:nth-child(2),
table td:nth-child(3),
table td:nth-child(4),
table td:nth-child(5),
table td:nth-child(6),
table th:nth-child(2),
table th:nth-child(3),
table th:nth-child(4),
table th:nth-child(5),
table th:nth-child(6) {
    text-align: center;
    vertical-align: middle;
}

/* === Кликабельные заголовки сортировки (всегда со стрелками) === */

.table thead th a.sort-link,
.table thead th a.sort-link:link,
.table thead th a.sort-link:visited {
    color: #475569;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color .2s ease;
}

.table thead th a.sort-link:hover {
    color: #1e293b;
    text-decoration: underline;
}

.table thead th .sort-arrows {
    display: inline-flex;
    flex-direction: column;
    line-height: 0.8;
    font-size: 10px;
    opacity: 0.35;
    /* тусклые по умолчанию */
    margin-left: 4px;
}

.table thead th.active .sort-arrows {
    opacity: 1;
    /* активная колонка — тёмная стрелка */
    color: #475569;
}

.table thead th.active .sort-arrows .up.active,
.table thead th.active .sort-arrows .down.active {
    color: #1e293b;
    opacity: 1;
}


.status.vip {
    color: #61b967;
    /* зелёный */
    font-weight: 600;
    /* жирный */
}

.notice {
    background: #eef7ff;
    border: 1px solid #cfe3ff;
    color: #19304f;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin: 10px 0 var(--gap)
}

.err {
    background: #fff4f4;
    border: 1px solid #ffdcdc;
    color: #7a1b1b;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap)
}

.sticker {
    width: 300px;
    height: 190px;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 10px 12px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 6px;
    background: #fff
}

.sticker__event {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #333
}

.sticker__name {
    font-weight: 900;
    font-size: 28px;
    line-height: 1.1
}

.sticker__role {
    font-weight: 700;
    font-size: 16px;
    color: #111
}

.sticker--role-VIP {
    border-color: #bd0100
}

.sticker--role-Докладчик {
    border-color: #61b967
}

.login {
    max-width: 450px;
    display: block;
    margin: 0% auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

}

.action-btn {
    display: inline-block;
    font-size: 18px;
    padding: 6px 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.07);
}


@media print {
  @page {
    size: 80mm 50mm;
    margin: 0;
  }

  body {
    margin: 0;
    background: #fff;
  }

  .sticker {
    width: 80mm;
    height: 50mm;
    border: 0;
    padding: 4mm 5mm;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
  }

  .sticker__event {
    font-size: 9pt;
  }

  .sticker__name {
    font-size: 24pt;
    width: 100%;
  }

  .sticker__role {
    font-size: 11pt;
  }
}