:root {
    --sidebar: #0F172A;
    --sidebar-hover: #1E293B;
    --primary: #2563EB;
    --background: #F1F5F9;
    --white: #FFFFFF;
    --text-main: #0F172A;
    --text-soft: #64748B;
    --border: #E2E8F0;

  --card-bg: rgba(255, 255, 255, 0.82);
--card-border: rgba(255, 255, 255, 0.28);
    --input-bg: #FFFFFF;

--shadow:
0 20px 60px rgba(15,23,42,.22);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);

   background:
linear-gradient(
rgba(8,15,35,.60),
rgba(8,15,35,.60)
),
url("../images/sport-bg.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

.landing-page,
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hero-card{
    position:relative;
    animation:floatCard 3s ease-in-out infinite;
}

.hero-card,
.auth-card{
    width:min(1100px,100%);
    padding:52px;

    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.35);

    border-radius:28px;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);

    overflow:hidden;
}

.hero-card::before{
    content:"";
    position:absolute;
    inset:0;

    border-radius:inherit;

    background:
    linear-gradient(
        130deg,
        rgba(255,255,255,.35),
        rgba(255,255,255,.05)
    );

    pointer-events:none;
}


.hero-logo {
    text-align: center;
    margin-bottom: 20px;
}

.hero-logo img {
   width: 120px;
    height: auto;
}



@keyframes floatCard{

0%,100%{
transform:translateY(0px);
}

50%{
transform:translateY(-5px);
}

}

.eyebrow {
    margin: 0 0 12px;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1.1;
}

.hero-text,
.auth-text,
.role-card p,
.helper-text {
    color: var(--text-soft);
    line-height: 1.7;
}

.hero-text {
    max-width: 700px;
    margin: 18px 0 36px;
    font-size: 1.05rem;
}

.role-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-top: 34px;
}

.role-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.role-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.4);

    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);

    border-radius:22px;

    box-shadow:
        0 12px 30px rgba(15,23,42,.12);

    transition:.3s
    border-radius: 22px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-card:hover {
    transform:
        translateY(-8px)
        scale(1.02);

    background:
        rgba(255,255,255,.68);

    box-shadow:
        0 18px 40px rgba(15,23,42,.22);
}

.role-icon-box {
    width: 86px;
    height: 86px;
    margin: 0 auto 18px;
    border-radius: 50%;
   background:rgba(255,255,255,.45);

backdrop-filter:blur(8px);

border:1px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.role-card h2 {
       margin: 0 0 12px;
    font-size: 1.55rem;
} 

.role-card p {
    min-height: 95px;
    margin: 0 0 22px;
    color: #64748B;
    line-height: 1.7;
}

.role-btn {
    width: 100%;
    text-align: center;
}

.role-buttons {
    display: grid;
    gap: 10px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.secondary-btn {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    margin-top: 12px;
}

.primary-btn {
    background: #64748B;
    color: #FFFFFF;
}

.primary-btn:hover {
    background: #334155;
    transform: translateY(-2px);
}

.secondary-btn {
    background: var(--accent);
    color: #1f2937;
    border: 2px solid #1f2937;
}

.secondary-btn:hover {
    background: #CBD5E1;
    transform: translateY(-2px);
}

.auth-card {
    width: min(520px, 100%);
    padding: 36px 32px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #64748B;
    font-weight: 600;
}

.auth-form {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.auth-form label {
    font-weight: 600;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
    color: #0F172A;
    font-size: 1rem;
}

.auth-form input::placeholder {
    color: #647488;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-icon-field {
    position: relative;
}

.input-icon-field input {
    padding-left: 48px;
}

.input-field-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.72;
    pointer-events: none;
    transform: translateY(-50%);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-visible {
    background: rgba(37, 99, 235, 0.1);
}

.password-toggle:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

.password-toggle img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.72;
}

.full-width {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.helper-text {
    margin-top: 20px;
    margin-bottom: 0;
}

.helper-text a {
    color: #647488;
    font-weight: 700;
}

.dashboard-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background: #F1F5F9;
}

.sidebar {
   background: #0F172A;
    color: var(--white);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-brand h1 {
    font-size: 1.5rem;
}

.sidebar-label {
    margin: 0 0 10px;
    color: #94A3B8;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.sidebar-menu {
    display: grid;
    gap: 12px;
}

.sidebar-dropdown {
    display: grid;
    gap: 10px;
}

.sidebar-dropdown summary {
    list-style: none;
}

.sidebar-dropdown summary::-webkit-details-marker,
.submenu-group summary::-webkit-details-marker {
    display: none;
}

.menu-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.menu-item:hover,
.menu-item.active {
    background: #64748B;
    color: #FFFFFF;
    transform: translateX(4px);
}

.borang-summary {
    cursor: pointer;
}

.sidebar-submenu {
    display: grid;
    gap: 10px;
    padding-left: 8px;
}

.submenu-group {
    display: grid;
    gap: 8px;
}

.submenu-parent {
    gap: 10px;
}

.submenu-title {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 700;
    cursor: pointer;
}

.submenu-parent-title {
    background: rgba(255, 255, 255, 0.12);
}

.submenu-links-block {
    display: grid;
    gap: 10px;
    padding-left: 10px;
}

.submenu-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.submenu-link {
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.submenu-link.active,
.submenu-link:hover {
    background: #94A3B8;
    color: #FFFFFF;
}

.submenu-empty {
    margin: 0;
    color: #dbeafe;
    font-size: 0.92rem;
    line-height: 1.6;
}

.logout-btn {
    margin-top: auto;
    text-align: center;
    background: #1E293B;
    color: #FFFFFF;
}

.logout-btn:hover {
    background: #64748B;
    color: #FFFFFF;
}

.dashboard-content {
    padding: 32px;
    display: grid;
    gap: 24px;
}

.dashboard-header {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    padding: 28px 30px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.dashboard-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.add-btn {
    margin-top: 0;
}

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

.summary-card {
     background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.summary-label {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-card h3 {
    margin: 10px 0 6px;
    color: #2563EB;
    font-weight: 700;
    font-size: 2.8rem;
}

.summary-note {
    color: #64748b;
    line-height: 1.6;
}

.selection-panel {
    background: var(--white);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.selection-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.panel-text {
    margin-top: 0;
    margin-bottom: 22px;
    color: #475569;
    line-height: 1.7;
}

.selection-form {
    display: grid;
    gap: 18px;
}

.championship-panel {
    margin: 0;
}

.championship-banner {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.championship-banner.compact {
    grid-template-columns: 88px 1fr;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 0;
}

.championship-banner.compact .championship-logo {
    width: 72px;
    height: 72px;
    padding: 8px;
}

.championship-banner.compact .placeholder-logo {
    min-height: 72px;
}

.championship-banner.compact .championship-banner-text h3 {
    font-size: clamp(1.1rem, 2vw, 1.8rem);
}

.championship-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.championship-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 10px;
}

.placeholder-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 700;
}

.championship-banner-text h3 {
    margin: 0;
    color: #1e293b;
    font-size: clamp(1.4rem, 3vw, 2.8rem);
    line-height: 1.2;
    text-transform: uppercase;
}

.championship-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.6;
}

.championship-title select {
    min-width: 160px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1rem;
}

.championship-title select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.table-panel,
.form-panel {
    background: var(--white);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.alert-box {
    border-radius: 18px;
    padding: 16px 20px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

.alert-info {
    background: #dbeafe;
    color: #1d4ed8;
}

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

.acara-group-list {
    display: grid;
    gap: 28px;
}

.acara-group-card {
    display: grid;
    gap: 14px;
}

.acara-group-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.7rem;
    font-weight: 800;
}

.acara-group-table {
    min-width: 980px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.admin-table th,
.admin-table td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.95rem;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.table-link {
    color: #1d4ed8;
    font-weight: 700;
}

.table-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

.empty-state-cell {
    color: #64748b;
    text-align: center;
    font-style: italic;
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-action {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.edit-action {
    background: #dbeafe;
    color: #1d4ed8;
}

.delete-action {
    background: #fee2e2;
    color: #dc2626;
}

.disabled-action {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.58);
    z-index: 1000;
}

.modal-overlay.show,
.modal-overlay.active{
    display: flex;
}

.modal-card {
    width: min(640px, 100%);
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    color: #0f172a;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.6rem;
}

.modal-eyebrow {
    color: #1d4ed8;
}

.modal-close {
    border: none;
    background: #e2e8f0;
    color: #0f172a;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

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

.delete-modal-card {
    width: min(520px, 100%);
}

.delete-eyebrow {
    color: #dc2626;
}

.delete-message {
    margin-top: 0;
    margin-bottom: 24px;
    color: #334155;
    line-height: 1.7;
}

.delete-confirm-btn {
    display: inline-block;
    padding: 14px 22px;
    border: none;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.delete-confirm-btn:hover {
    background: #b91c1c;
}

.form-panel-header h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.management-form {
    display: grid;
    gap: 20px;
}

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

.management-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1e293b;
}

.management-form input,
.management-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1rem;
}

.management-form input:focus,
.management-form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.helper-note {
    margin-top: 8px;
    margin-bottom: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.form-secondary-btn {
    margin-top: 0;
}

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

.rumah-note {
    margin-top: 0;
}

.print-list-heading {
    display: none;
}

.rumah-group-card {
    gap: 18px;
}

.kategori-group-card {
    display: grid;
    gap: 12px;
}

.kategori-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kategori-group-title {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 800;
}

.kategori-group-count {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
}

.rumah-print-table {
    min-width: 820px;
}

.no-print-cell {
    width: 180px;
}

.borang-page {
    display: grid;
    gap: 28px;
}

.borang-sheet {
    background: #ffffff;
    border-radius: 18px;
    padding: 30px;
    color: #0f172a;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.borang-header {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.borang-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.borang-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.borang-logo-placeholder {
    border: 1px solid #94a3b8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: #64748b;
}

.borang-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
}

.borang-label {
    margin-bottom: 10px;
    font-weight: 700;
}

.borang-meta-table,
.borang-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.borang-meta-table th,
.borang-meta-table td,
.borang-table th,
.borang-table td {
    border: 1px solid #334155;
    padding: 8px 6px;
    text-align: center;
    font-size: 0.9rem;
}

.borang-meta-table th {
    width: 16%;
}

.borang-meta-table td:nth-child(2) {
    text-align: left;
}

.kategori-cell,
.kategori-mark {
    width: 7%;
    font-weight: 700;
}

.borang-table th:nth-child(2),
.borang-table td:nth-child(2) {
    text-align: left;
    width: 34%;
}

.borang-table th:nth-child(3),
.borang-table td:nth-child(3),
.borang-table th:nth-child(4),
.borang-table td:nth-child(4),
.borang-table th:nth-child(5),
.borang-table td:nth-child(5),
.borang-table th:nth-child(6),
.borang-table td:nth-child(6) {
    width: 12%;
}

.borang-table tbody td {
    height: 34px;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin-top: 26px;
}

.signature-item {
    min-height: 84px;
}

.signature-label {
    margin: 0 0 30px;
    font-weight: 700;
}

.signature-line {
    border-top: 1px dotted #334155;
    width: 100%;
}

.borang-padang-sheet {
    padding: 26px 24px 30px;
}

.borang-padang-header {
    margin-bottom: 12px;
}

.borang-padang-brand {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 14px;
}

.borang-padang-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
}

.borang-padang-caption,
.borang-padang-decision-title {
    margin-bottom: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.borang-padang-meta {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1.2fr;
    gap: 18px;
    margin-bottom: 18px;
    font-size: 0.94rem;
    font-weight: 700;
}

.borang-padang-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 26px;
}

.borang-padang-table th,
.borang-padang-table td {
    border: 1px solid #334155;
    padding: 8px 6px;
    text-align: center;
    font-size: 0.9rem;
}

.col-bil {
    width: 3%;
}

.col-no {
    width: 8%;
}

.col-nama {
    width: 30%;
}

.col-rumah {
    width: 10%;
}

.col-cubaan {
    width: 8%;
}

.col-terbaik {
    width: 17%;
}

.col-kedudukan {
    width: 10%;
}

.borang-padang-result-table {
    width: 48%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-top: 14px;
    margin-bottom: 20px;
}

.borang-padang-result-table th,
.borang-padang-result-table td {
    border: 1px solid #334155;
    padding: 8px 6px;
    text-align: center;
    font-size: 0.9rem;
    height: 28px;
}

.borang-padang-result-table th:nth-child(1) {
    width: 14%;
}

.borang-padang-result-table th:nth-child(2) {
    width: 43%;
}

.borang-padang-result-table th:nth-child(3) {
    width: 15%;
}

.borang-padang-result-table th:nth-child(4) {
    width: 12%;
}

.borang-padang-result-table th:nth-child(5) {
    width: 14%;
}

.padang-name-cell {
    text-align: left !important;
}

.borang-padang-signature {
    display: grid;
    gap: 28px;
    margin-top: 10px;
    font-weight: 700;
}

.borang-padang-signature strong {
    display: block;
    margin-bottom: 10px;
}


    .borang-balapan-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 20px;
}

.borang-balapan-table th,
.borang-balapan-table td {
    border: 1px solid #334155;
    padding: 8px 6px;
    text-align: center;
    font-size: 0.9rem;
}

.borang-balapan-table th:nth-child(2),
.borang-balapan-table td:nth-child(2) {
    text-align: left;
    width: 45%;
}

.borang-balapan-table th:nth-child(1),
.borang-balapan-table td:nth-child(1) {
    width: 6%;
}

.borang-balapan-table th:nth-child(3),
.borang-balapan-table td:nth-child(3),
.borang-balapan-table th:nth-child(4),
.borang-balapan-table td:nth-child(4),
.borang-balapan-table th:nth-child(5),
.borang-balapan-table td:nth-child(5),
.borang-balapan-table th:nth-child(6),
.borang-balapan-table td:nth-child(6) {
    width: 12%;
}

.borang-balapan-table tbody td {
    height: 34px;
}
   .borang-balapan-table {
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .hero-card {
        padding: 32px 22px;
    }

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

    .auth-card {
        padding: 28px 20px;
    }

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

    .sidebar {
        gap: 18px;
    }

    .submenu-links {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-content {
        padding: 20px;
    }

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

    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .championship-title {
        align-items: stretch;
    }

    .championship-banner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .championship-banner.compact {
        grid-template-columns: 1fr;
    }

    .borang-header,
    .borang-padang-brand,
    .borang-padang-meta,
    .signature-grid {
        grid-template-columns: 1fr;
    }

    .championship-title select {
        width: 100%;
    }

    .table-panel,
    .form-panel {
        padding: 20px;
    }

    .modal-card {
        padding: 20px;
    }

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

    .kategori-group-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {

    @page balapan-portrait {
        size: A4 portrait;
        margin: 5mm;
    }

    @page padang-landscape {
        size: A4 landscape;
        margin: 6mm;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    .sidebar,
    .print-toolbar,
    .championship-panel,
    .modal-overlay,
    .no-print-cell {
        display: none !important;
    }

    .dashboard-layout {
        display: block;
        background: #ffffff;
    }

    .dashboard-content {
        padding: 0;
        gap: 0;
    }

    .dashboard-header,
    .table-panel,
    .acara-group-card,
    .kategori-group-card,
    .selection-panel,
    .borang-sheet {
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .table-panel,
    .selection-panel {
        padding: 0;
    }

    .borang-page {
        gap: 0;
    }

    .borang-logo {
        width: 34px;
        height: 34px;
    }

    .signature-line {
        border-top: 1px dotted #000000;
    }

    .borang-balapan-print .borang-page {
        display: grid;
        grid-template-rows: 1fr 1fr;
        gap: 20mm;
    }

    .borang-balapan-print .borang-balapan-sheet {
        page: balapan-portrait;
        padding: 2mm 4mm;
        margin: 20px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .borang-balapan-print .borang-sheet--page-break {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .borang-balapan-print .borang-header {
        grid-template-columns: 38px 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .borang-balapan-print .borang-title {
        font-size: 9.6px;
        line-height: 1.2;
    }

    .borang-balapan-print .borang-label {
        margin-bottom: 4px;
        font-size: 8.6px;
    }

    .borang-balapan-print .borang-meta-table {
        margin-bottom: 20px;
    }

    .borang-balapan-print .borang-balapan-table {
        margin-bottom: 8px;
    }

    .borang-balapan-print .borang-meta-table th,
    .borang-balapan-print .borang-meta-table td,
    .borang-balapan-print .borang-balapan-table th,
    .borang-balapan-print .borang-balapan-table td {
        border: 1px solid #000000;
        padding: 2px 3px;
        font-size: 10px;
        line-height: 1.15;
        color: #000000;
        background: #ffffff;
    }

    .borang-balapan-print .borang-meta-table th {
        width: 16%;
    }

    .borang-balapan-print .borang-meta-table td:nth-child(2) {
        text-align: left;
    }

    .borang-balapan-print .borang-balapan-table th:nth-child(1),
    .borang-balapan-print .borang-balapan-table td:nth-child(1) {
        width: 10%;
    }

    .borang-balapan-print .borang-balapan-table th:nth-child(2),
    .borang-balapan-print .borang-balapan-table td:nth-child(2) {
        width: 48%;
        text-align: left;
    }

    .borang-balapan-print .borang-balapan-table th:nth-child(3),
    .borang-balapan-print .borang-balapan-table td:nth-child(3) {
        width: 12%;
    }

    .borang-balapan-print .borang-balapan-table th:nth-child(4),
    .borang-balapan-print .borang-balapan-table td:nth-child(4),
    .borang-balapan-print .borang-balapan-table th:nth-child(5),
    .borang-balapan-print .borang-balapan-table td:nth-child(5),
    .borang-balapan-print .borang-balapan-table th:nth-child(6),
    .borang-balapan-print .borang-balapan-table td:nth-child(6) {
        width: 11%;
    }

    .borang-balapan-print .borang-balapan-table tbody td {
        height: 14px;
    }

    .borang-balapan-print .signature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        margin-top: 10px;
    }

    .borang-balapan-print .signature-item {
        min-height: 44px;
    }

    .borang-balapan-print .signature-label {
        margin-bottom: 18px;
        font-size: 8.2px;
        color: #000000;
    }

    .borang-padang-print .borang-padang-sheet {
        page: padang-landscape;
        width: 100%;
        max-width: none;
        padding: 4mm 5mm;
        margin: 0;
        break-inside: avoid;
        page-break-inside: avoid;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    }

    .borang-padang-print .borang-padang-header {
        margin-bottom: 6px;
    }

    .borang-padang-print .borang-padang-brand {
        grid-template-columns: 38px 1fr;
        gap: 8px;
    }

    .borang-padang-print .borang-padang-title {
        font-size: 9.6px;
        line-height: 1.2;
    }

    .borang-padang-print .borang-padang-caption,
    .borang-padang-print .borang-padang-decision-title {
        margin-bottom: 6px;
        font-size: 10px;
        color: #000000;
    }

    .borang-padang-print .borang-padang-meta {
        grid-template-columns: 1fr 1.25fr 1.15fr;
        gap: 18px;
        margin-bottom: 12px;
        font-size: 10px;
        line-height: 1.15;
        color: #000000;
    }

    .borang-padang-print .borang-padang-meta strong {
        font-size: 10px;
        font-weight: 700;
    }

    .borang-padang-print .borang-padang-table,
    .borang-padang-print .borang-padang-result-table {
        margin-bottom: 14px;
    }

    .borang-padang-print .borang-padang-table {
        width: 94%;
        margin-left: auto;
        margin-right: auto;
    }

    .borang-padang-print .borang-padang-table th,
    .borang-padang-print .borang-padang-table td,
    .borang-padang-print .borang-padang-result-table th,
    .borang-padang-print .borang-padang-result-table td {
        border: 1px solid #000000;
        padding: 4px 4px;
        font-size: 10px;
        line-height: 1.15;
        color: #000000;
        background: #ffffff;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    }

    .borang-padang-print .borang-padang-table th,
    .borang-padang-print .borang-padang-result-table th {
        font-size: 10px;
        font-weight: 700;
    }

    .borang-padang-print .borang-padang-table td,
    .borang-padang-print .borang-padang-result-table td {
        height: 18px;
    }

    .borang-padang-print .col-bil {
        width: 4%;
    }

    .borang-padang-print .col-no {
        width: 9%;
    }

    .borang-padang-print .col-nama {
        width: 28%;
    }

    .borang-padang-print .col-rumah {
        width: 9%;
    }

    .borang-padang-print .col-cubaan {
        width: 6%;
    }

    .borang-padang-print .col-terbaik {
        width: 14%;
    }

    .borang-padang-print .col-kedudukan {
        width: 10.5%;
    }

    .borang-padang-print .borang-padang-result-table {
        width: 72%;
        margin-left: auto;
        margin-right: auto;
    }

    .borang-padang-print .borang-padang-signature {
        gap: 16px;
        margin-top: 32px;
        font-size: 10px;
        color: #000000;
    }

    .borang-padang-print .borang-padang-signature strong {
        display: block;
        margin-bottom: 10px;
    }
}

/* Statistik result entry and official three-copy print form. */
.statistik-event-menu {
    display: grid;
    gap: 6px;
    max-height: 56vh;
    overflow-y: auto;
}

.statistik-entry-panel {
    display: grid;
    gap: 22px;
}

.statistik-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.statistik-wide-field {
    grid-column: span 2;
}

.official-results-sheet {
    width: min(100%, 900px);
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
    border: 1px solid #0f172a;
}

.official-result-copy {
    padding: 10px 18px 14px;
    border-bottom: 4px double #000000;
    break-inside: avoid;
}

.official-result-copy:last-child {
    border-bottom: 0;
}

.official-result-header {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.official-logo-wrap img,
.official-logo-wrap span {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.official-logo-wrap span {
    display: grid;
    place-items: center;
    border: 1px solid #000000;
    font-size: 9px;
}

.official-result-header h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 500;
}

.official-result-header p {
    margin: 12px 0 8px;
    font-size: 11px;
    font-weight: 800;
}

.official-result-meta {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3px 26px;
    margin-bottom: 3px;
    font-size: 10px;
}

.official-result-meta span {
    display: inline-block;
    min-width: 170px;
    min-height: 12px;
    padding-left: 4px;
    border-bottom: 1px solid #000000;
}

.official-result-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 10px;
}

.official-result-table th,
.official-result-table td {
    height: 20px;
    padding: 2px 4px;
    border: 1px solid #000000;
    text-align: center;
}

.official-result-table th:nth-child(1) { width: 7%; }
.official-result-table th:nth-child(2) { width: 43%; }
.official-result-table th:nth-child(3) { width: 15%; }
.official-result-table th:nth-child(4) { width: 15%; }
.official-result-table th:nth-child(5) { width: 20%; }
.official-result-table td:nth-child(2) { text-align: left; }

.official-result-footer {
    display: grid;
    grid-template-columns: 1.4fr 1fr 120px;
    align-items: end;
    gap: 18px;
    margin-top: 30px;
    font-size: 10px;
    font-weight: 700;
}

.signature-block {
    padding: 8px 12px 0;
    border-top: 1px solid #000000;
}

.date-line {
    display: inline-block;
    width: 80px;
    border-bottom: 1px solid #000000;
}

.copy-stamp {
    padding: 3px 7px;
    border: 3px double #000000;
    text-align: right;
    font-style: italic;
    font-size: 11px;
}

.statistik-result-list {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.statistik-result-list h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.05rem;
}

.statistik-edit-table {
    min-width: 760px;
}

.winner-list-panel {
    display: grid;
    gap: 24px;
}

.winner-print-header {
    display: grid;
    gap: 6px;
}

.winner-print-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1.35;
}

.winner-print-header p {
    margin: 0;
    color: #475569;
}

.winner-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 16px;
}

.winner-summary > div {
    padding: 16px 18px;
    border: 1px solid #d7e3f3;
    border-radius: 18px;
    background: #f8fafc;
}

.winner-summary strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 1.8rem;
}

.winner-event-list {
    display: grid;
    gap: 22px;
}

.winner-event-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #d7e3f3;
    border-radius: 22px;
    background: #ffffff;
}

.winner-event-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.winner-event-heading p {
    margin: 0 0 4px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.winner-event-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
}

.winner-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.winner-category-card {
    display: grid;
    gap: 10px;
}

.winner-category-card h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
}

.winner-table {
    min-width: 680px;
}

.winner-table th:first-child,
.winner-table td:first-child {
    width: 92px;
    text-align: center;
}

.winner-empty-row td {
    color: #94a3b8;
}

.winner-empty-message {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    background: #f8fafc;
}

@media (max-width: 768px) {
    .statistik-form-grid {
        grid-template-columns: 1fr;
    }

    .statistik-wide-field {
        grid-column: auto;
    }

    .official-results-sheet {
        overflow-x: auto;
    }

    .official-result-copy {
        min-width: 760px;
    }

    .winner-summary,
    .winner-category-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page statistik-results {
        size: A4 portrait;
        margin: 5mm;
    }

    .statistik-layout .dashboard-content {
        padding: 0;
    }

    .official-results-sheet {
        page: statistik-results;
        width: 100%;
        border: 1px solid #000000;
    }

    .official-result-copy {
        padding: 2mm 3mm 3mm;
    }

    .official-result-header h2 {
        font-size: 12px;
    }

    .official-result-header p {
        margin: 7px 0 5px;
        font-size: 8px;
    }

    .official-result-meta,
    .official-result-table,
    .official-result-footer {
        font-size: 8px;
    }

    .official-result-table th,
    .official-result-table td {
        height: 15px;
        padding: 1px 3px;
    }

    .official-result-footer {
        margin-top: 20px;
    }

    .winner-list-panel {
        padding: 0;
        gap: 4mm;
    }

    .winner-print-header {
        margin-bottom: 3mm;
        text-align: center;
    }

    .winner-print-header .eyebrow {
        color: #000000;
    }

    .winner-print-header h3,
    .winner-print-header p,
    .winner-event-heading h3,
    .winner-event-heading p,
    .winner-category-card h4 {
        color: #000000;
    }

    .winner-event-list {
        gap: 5mm;
    }

    .winner-event-card {
        padding: 0;
        border: 0;
        border-radius: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .winner-event-heading {
        display: block;
        margin-bottom: 2mm;
    }

    .winner-event-heading p {
        margin-bottom: 1mm;
        font-size: 9px;
        letter-spacing: 0;
    }

    .winner-event-heading h3 {
        font-size: 13px;
    }

    .winner-category-grid {
        grid-template-columns: 1fr;
        gap: 3mm;
    }

    .winner-category-card {
        gap: 1mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .winner-category-card h4 {
        font-size: 11px;
    }

    .winner-empty-message {
        padding: 0;
        border: 0;
        border-radius: 0;
        color: #000000;
        background: transparent;
        font-size: 9px;
    }

    .winner-table {
        min-width: 0;
        width: 100%;
        font-size: 9px;
    }

    .winner-table th,
    .winner-table td {
        padding: 2px 4px;
        border-color: #000000;
    }

    .winner-table th:first-child,
    .winner-table td:first-child {
        width: 54px;
    }
}
