/* Portal — Đăng ký mùa giải (3 tab) */
.dk-public .dk-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 2px solid var(--portal-border, #e8e8e4);
    margin-bottom: var(--space-4, 1rem);
    padding: 0.25rem 0 0;
    background: transparent;
}
.dk-public .dk-tabs__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem 0.8rem;
    min-height: 2.8rem;
    font-family: var(--font-display, inherit);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: nowrap;
    color: var(--tng-muted, #6b7280);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.4rem 0.4rem 0 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.dk-public .dk-tabs__item:hover {
    color: var(--tng-primary, #1565c0);
    background: rgba(21, 101, 192, 0.05);
}
.dk-public .dk-tabs__item.is-active {
    color: var(--tng-primary, #1565c0);
    border-color: var(--portal-border, #e8e8e4);
    border-bottom-color: #fff;
    background: #fff;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.02) inset;
}
.dk-public .dk-tab-panel {
    animation: dkTabIn 0.2s ease;
}
@keyframes dkTabIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
.dk-stats-row {
    margin-bottom: var(--space-4, 1rem);
}
.dk-stats-row .stat-tile small {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
}
.dk-doc-table .doc-stamp--uploaded {
    background: var(--fl-approved, #e8f5e9);
    color: #2e7d32;
}
.dk-doc-table .doc-stamp--missing {
    background: #f5f5f5;
    color: #757575;
}
.dk-timeline {
    border-left: 2px solid var(--portal-border, #e8e8e4);
    margin-left: 0.5rem;
    padding-left: 1rem;
}
.dk-timeline__item {
    position: relative;
    padding-bottom: 1rem;
    font-size: 0.875rem;
}
.dk-timeline__item::before {
    content: '';
    position: absolute;
    left: -1.35rem;
    top: 0.35rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--portal-primary, #1565c0);
}
.dk-mau-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0 1.5rem;
}
.dk-mau-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border: 1px solid #e0e3e8;
    border-radius: 8px;
    background: #fafbfc;
}
.dk-mau-card strong {
    font-size: 0.85rem;
    line-height: 1.3;
    word-break: break-word;
}
.dk-mau-card .btn-small {
    margin-top: auto;
    font-size: 0.75rem;
    padding: 0 12px;
    height: 28px;
    line-height: 28px;
    border-radius: 4px;
}
.dk-nhan-su-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: var(--space-4, 1rem);
}
.dk-import-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Boxed Ledger Form Controls for Registration */
.dk-form-group {
    margin-bottom: 1.15rem;
    position: relative;
}
.dk-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tng-text, #1f2937);
    margin-bottom: 0.35rem;
    text-transform: none;
    letter-spacing: 0;
}
.dk-input,
.dk-select,
.dk-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.875rem;
    color: var(--tng-text, #1f2937);
    background-color: #fff;
    border: 1px solid var(--fl-border, #C8CDD4);
    border-radius: 6px;
    padding: 0 0.75rem;
    height: 2.5rem;
    line-height: 2.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    outline: none;
    margin: 0 !important;
}
.dk-textarea {
    height: auto;
    min-height: 5.5rem;
    padding: 0.6rem 0.75rem;
    line-height: 1.45;
    resize: vertical;
}
.dk-input:focus,
.dk-select:focus,
.dk-textarea:focus {
    border-color: var(--tng-primary, #1a73e8);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.18);
    background-color: #fff;
}
.dk-input:disabled,
.dk-select:disabled,
.dk-textarea:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

/* Compact inputs inside table */
.dk-table-input,
.dk-table-select {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.8125rem;
    border: 1px solid var(--fl-border, #C8CDD4);
    border-radius: 4px;
    padding: 0 0.5rem;
    height: 2rem;
    line-height: 2rem;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease;
}
.dk-table-input:focus,
.dk-table-select:focus {
    border-color: var(--tng-primary, #1a73e8);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}
.dk-table-input:disabled,
.dk-table-select:disabled {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

/* Notification Banners */
.portal-lock-hint {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.portal-lock-hint--warn {
    background: #fff8e1;
    color: #b78103;
    border-left: 4px solid #f59e0b;
}
.portal-lock-hint--info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid var(--tng-primary, #1a73e8);
}
.portal-lock-hint--success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}
.dk-reject-banner {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.dk-reject-banner strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.dk-reject-banner p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Document Dropzone & Progress */
.dk-doc-upload {
    min-width: 230px;
}

.dk-doc-drop {
    position: relative;
    border: 1.5px dashed var(--fl-border, #c8cdd4);
    border-radius: 6px;
    background: #fafbfc;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dk-doc-drop.is-drag {
    border-color: var(--tng-primary, #1a73e8);
    background: rgba(26, 115, 232, 0.08);
}

.dk-doc-drop.is-uploading {
    opacity: 0.75;
}

.dk-doc-drop__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.dk-doc-drop__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--tng-muted, #4b5563);
    cursor: pointer;
}

.dk-doc-drop__label .material-icons {
    font-size: 1.1rem;
    color: var(--tng-primary, #1a73e8);
}

.dk-doc-upload__meta {
    margin-top: 0.4rem;
}
.dk-doc-upload__meta small {
    display: block;
    margin-top: 0.25rem;
    line-height: 1.35;
}

.dk-doc-progress {
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.dk-doc-progress__bar {
    height: 100%;
    width: 0;
    background: var(--tng-primary, #1a73e8);
    transition: width 0.15s linear;
}

/* Status stamps */
.doc-stamp {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.doc-stamp--pending {
    background: #fef3c7;
    color: #92400e;
}
.doc-stamp--approved {
    background: #dcfce7;
    color: #166534;
}
.doc-stamp--needs {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .dk-public .dk-tabs {
        gap: 0.15rem;
    }
    .dk-public .dk-tabs__item {
        flex: 1 1 calc(33.33% - 0.15rem);
        min-width: 0;
        white-space: normal;
        text-align: center;
        padding: 0.6rem 0.45rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* Document file links */
.dk-doc-filename {
    color: var(--tng-primary, #1a73e8);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.dk-doc-filename:hover { text-decoration: underline; color: #1557b0; }

.dk-doc-view-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--tng-primary, #1a73e8);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 6px;
}
.dk-doc-view-link:hover { text-decoration: underline; color: #1557b0; }
.dk-doc-view-link .material-icons { font-size: 1rem; }

/* Pub-tabs (shared tab style) */
.pub-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: 16px;
  padding: 3px;
  background: #f5f6f8;
  border: 1px solid #e0e3e8;
  border-radius: 6px;
}
.pub-tabs__btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  flex: 1 1 0%;
  padding: 8px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #666;
  border-radius: 4px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}
.pub-tabs__btn em {
  font-style: normal;
  font-weight: 700;
  margin-left: 3px;
}
.pub-tabs__btn:hover { color: #1a73e8; background: rgba(26, 115, 232, 0.06); }
.pub-tabs__btn.is-active {
  color: #fff;
  background: #1a73e8;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.25);
}

.portal-btn--muted {
  opacity: 0.65;
  cursor: pointer;
}
.portal-btn--muted:hover {
  opacity: 0.85;
}

/* Tab Badge */
.pub-tabs__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 6px;
    line-height: 1.2;
    vertical-align: middle;
}
.pub-tabs__btn.is-active .pub-tabs__badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.pub-tabs__badge--ok {
    background: #e6f4ea;
    color: #137333;
}
.pub-tabs__badge--warn {
    background: #fef7e0;
    color: #b06000;
}
.pub-tabs__badge--err {
    background: #fce8e6;
    color: #c5221f;
}

/* Error Summary Box */
.dk-error-box {
    background: #fdf2f2;
    border: 1px solid #f8b4b4;
    border-left: 4px solid #e02424;
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
}
.dk-error-box__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #9b1c1c;
    margin: 0 0 0.5rem;
}
.dk-error-box__list {
    margin: 0;
    padding-left: 1.25rem;
}
.dk-error-box__item {
    font-size: 0.85rem;
    color: #771d1d;
    margin-bottom: 0.35rem;
}
.dk-error-box__link {
    font-weight: 600;
    color: #1a56db;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 4px;
}
.dk-error-box__link:hover {
    color: #1e429f;
}

/* Duplicate jersey warning */
.dk-dup-warn {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #b78103;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.82rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

