* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #111;
    color: #fff;
}

/* =========================
   INDEX / AUTH
========================= */
.club-body{
    margin:0;
    padding:0;
    font-family:Arial, Helvetica, sans-serif;
    background:
    radial-gradient(circle at top left, rgba(255,255,255,0.05), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255,215,0,0.08), transparent 30%),
    linear-gradient(135deg,#081520,#0f2a3d,#102d1d);
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
}

.club-container{
    width:420px;
    background:rgba(0,0,0,0.55);
    backdrop-filter:blur(10px);
    border-radius:12px;
    padding:40px;
    box-shadow:0 20px 40px rgba(0,0,0,0.6);
    text-align:center;
}

.club-title{
    font-size:32px;
    letter-spacing:2px;
    margin-bottom:30px;
    color:#fff;
}

.club-sub{
    margin-bottom:20px;
    color:#ddd;
}

.club-form input{
    width:100%;
    padding:12px;
    margin-bottom:12px;
    border-radius:6px;
    border:none;
    background:#1c2d3a;
    color:#fff;
}

.club-form button{
    width:100%;
    padding:12px;
    border:none;
    border-radius:6px;
    background:#00aaff;
    color:#fff;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;
}

.club-form button:hover{
    background:#008ecc;
}

.club-menu{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.club-btn{
    display:block;
    padding:14px;
    background:#1c2d3a;
    color:#fff;
    text-decoration:none;
    border-radius:8px;
    transition:.2s;
}

.club-btn:hover{
    background:#00aaff;
}

.club-error{
    margin-top:15px;
    color:#ff6b6b;
}

.club-success{
    margin-top:15px;
    color:#5cff9d;
}
.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrap {
    width: 100%;
    max-width: 520px;
}

.auth-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.auth-box h1 {
    margin: 0 0 12px;
    text-align: center;
    color: #ff2a2a;
    font-size: 32px;
    font-weight: 800;
}

.subtext {
    text-align: center;
    color: #bbb;
    margin: 0 0 22px;
    font-size: 15px;
}

form {
    margin: 0;
}

input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid #444;
    background: #0d0d0d;
    color: #fff;
    outline: none;
    margin-bottom: 12px;
    font-size: 15px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input[type="password"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #ff2a2a;
}

button,
.main-link,
.small-link {
    display: inline-block;
    padding: 13px 14px;
    border: none;
    border-radius: 10px;
    background: #e10600;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover,
.main-link:hover,
.small-link:hover {
    opacity: 0.92;
}

.main-link {
    display: block;
    width: 100%;
    margin-bottom: 12px;
}

.small-link {
    padding: 10px 14px;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.4;
}

.alert.error {
    background: #4b1111;
    color: #ffb7b7;
    border: 1px solid #6a1b1b;
}

.alert.success {
    background: #10391a;
    color: #b9ffbf;
    border: 1px solid #1a5a28;
}

.alert.info {
    background: #13293d;
    color: #b9dcff;
    border: 1px solid #21496d;
}

/* =========================
   ADMIN / PANEL / HISOBOT
========================= */
.admin-body,
.panel-body {
    min-height: 100vh;
    background: #111;
}

.admin-page,
.panel-page {
    max-width: 1450px;
    margin: 0 auto;
    padding: 24px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-topbar h1 {
    margin: 0 0 6px;
    color: #ff2a2a;
    font-size: 32px;
}

.admin-subtitle {
    margin: 0;
    color: #aaa;
    font-size: 15px;
}

.admin-top-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.admin-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
    color: #fff;
}

.full-card {
    width: 100%;
    margin-bottom: 18px;
}

.key-box,
.rule-box,
.bar-group-box {
    background: #101010;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.key-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}

.key-value {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    word-break: break-word;
}

.rule-box p {
    margin: 10px 0 0;
    color: #cfcfcf;
    line-height: 1.5;
}

.stack-form button {
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    margin-bottom: 6px;
}

.badge.danger {
    background: #5a1212;
    color: #ffb7b7;
    border: 1px solid #7a1a1a;
}

.badge.info {
    background: #163149;
    color: #b9dcff;
    border: 1px solid #21496d;
}

.badge.self {
    background: #2f2f2f;
    color: #fff;
    border: 1px solid #4a4a4a;
}

.devices-wrap {
    overflow-x: auto;
}

.devices-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.devices-table th,
.devices-table td {
    border-bottom: 1px solid #2c2c2c;
    padding: 14px 10px;
    text-align: left;
    vertical-align: top;
}

.devices-table th {
    font-size: 13px;
    color: #999;
    font-weight: 700;
    background: #141414;
}

.devices-table td {
    font-size: 14px;
    color: #eee;
}

.device-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.device-agent {
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.4;
}

.danger-btn {
    background: #8e1111;
    color: #fff;
    width: auto;
    min-width: 120px;
}

.danger-btn:hover {
    background: #b31313;
}

.green-btn {
    background: #15803d;
}

.green-btn:hover {
    background: #166534;
}

.small-green-btn {
    background: #15803d;
    width: 100%;
}

.small-green-btn:hover {
    background: #166534;
}

.yellow-btn {
    background: #ca8a04;
}

.yellow-btn:hover {
    background: #a16207;
}

.blue-btn {
    background: #2563eb;
}

.blue-btn:hover {
    background: #1d4ed8;
}

.muted-text {
    color: #888;
    font-size: 13px;
}

.empty-text {
    color: #999;
    padding: 10px 0;
}

.table-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.table-admin-item label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}

.bar-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bar-group-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.bar-table {
    min-width: 100%;
}

/* =========================
   PANEL
========================= */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.table-card {
    background: #000;
    border: 4px solid #000;
    overflow: hidden;
}

.table-title {
    background: #ff1200;
    color: #fff;
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    padding: 10px;
    text-transform: uppercase;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    background: #111;
    border-bottom: 4px solid #000;
}

.table-actions form {
    flex: 1;
    min-width: 120px;
}

.table-actions button {
    width: 100%;
}

.billiard-table {
    width: 100%;
    border-collapse: collapse;
    background: #ddd;
    color: #000;
}

.billiard-table th {
    background: #a30000;
    color: #fff;
    font-size: 13px;
    padding: 8px 5px;
    border: 1px solid #8a8a8a;
    white-space: nowrap;
}

.billiard-table th.start-col {
    background: #6ea93b;
}

.billiard-table td {
    text-align: center;
    padding: 6px 4px;
    border: 1px solid #bdbdbd;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.current-row {
    background: #f4f4f4;
}

.bar-panel {
    padding: 12px;
    background: #121212;
    border-top: 4px solid #000;
}

.bar-panel h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
}

.bar-add-form {
    display: grid;
    grid-template-columns: 1fr 100px 140px;
    gap: 8px;
    align-items: start;
}

.bar-add-form input,
.bar-add-form select,
.bar-add-form button {
    margin-bottom: 0;
}

.bar-lines {
    margin-top: 12px;
    border-top: 1px solid #2d2d2d;
    padding-top: 10px;
}

.bar-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed #2a2a2a;
    font-size: 14px;
}

/* =========================
   HISOBOT
========================= */
.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    align-items: end;
}

.report-filter-grid label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}

.report-filter-actions {
    display: flex;
    align-items: end;
}

.report-filter-actions button {
    width: 100%;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.report-stat-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.report-stat-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.report-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    word-break: break-word;
}
.permission-box {
    background: #101010;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    padding: 16px;
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #ddd;
    margin-bottom: 14px;
    line-height: 1.5;
}

.checkbox-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    accent-color: #e10600;
    flex: 0 0 auto;
}

.permission-box button {
    width: 100%;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
    .tables-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .report-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        flex-direction: column;
    }

    .admin-topbar h1 {
        font-size: 28px;
    }

    .tables-grid {
        grid-template-columns: 1fr;
    }

    .bar-add-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .report-filter-grid {
        grid-template-columns: 1fr;
    }

    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .auth-box {
        padding: 22px 16px;
        border-radius: 12px;
    }

    .auth-box h1 {
        font-size: 26px;
    }

    .subtext {
        font-size: 14px;
    }

    .admin-page,
    .panel-page {
        padding: 16px;
    }

    .admin-card {
        padding: 16px;
    }

    .key-value {
        font-size: 20px;
    }

    .table-admin-grid {
        grid-template-columns: 1fr;
    }

    .devices-table {
        min-width: 700px;
    }
}