/* HamLogTools – hamlogtools.css v2.0.0 */

.hlt-app { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; color: #1a1a1a; width: 100%; max-width: 100%; margin: 0 auto; padding: 0 0 2rem; box-sizing: border-box; }

/* Table scroll wrapper – scrollt horizontal ohne Sidebar zu überlappen */
.hlt-table-fullwidth {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-top: 8px;
    box-sizing: border-box;
}

/* Header */
.hlt-header { display: flex; align-items: center; gap: 10px; padding: 1.25rem 0 1rem; border-bottom: 1px solid #e5e5e5; margin-bottom: 1.25rem; }
.hlt-logo { font-size: 20px; font-weight: 600; }
.hlt-logo span { color: #1d9e75; }
.hlt-version { font-size: 11px; background: #f0f0f0; border-radius: 99px; padding: 2px 8px; color: #666; }

/* Tabs */
.hlt-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e5e5e5; margin-bottom: 1.25rem; flex-wrap: wrap; }
.hlt-tab { font-size: 13px; padding: 7px 13px; border: none; background: none; color: #666; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 4px 4px 0 0; transition: color .15s, border-color .15s; white-space: nowrap; }
.hlt-tab:hover { color: #1a1a1a; }
.hlt-tab--active { color: #1d9e75; border-bottom-color: #1d9e75; font-weight: 500; }

/* Dropzone */
.hlt-dropzone { border: 1.5px dashed #ccc; border-radius: 10px; padding: 2.5rem 1rem; text-align: center; background: #fafafa; cursor: pointer; position: relative; transition: border-color .2s, background .2s; }
.hlt-dropzone:hover, .hlt-dropzone--over { border-color: #1d9e75; background: #f0faf6; }
.hlt-dropzone__icon { font-size: 30px; color: #999; margin-bottom: 8px; }
.hlt-dropzone__title { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.hlt-dropzone__sub { font-size: 13px; color: #888; }
.hlt-upload-label { display:inline-flex; align-items:center; gap:6px; margin-top:12px; padding:6px 18px; background:#1d9e75; color:#fff; border-radius:6px; cursor:pointer; font-size:13px; font-weight:500; border:none; transition:background .15s; }
.hlt-upload-label:hover { background:#178a64; }
.hlt-file-input-hidden { position:absolute; left:-9999px; top:-9999px; width:1px; height:1px; }

/* Toolbar */
.hlt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.hlt-toolbar__left, .hlt-toolbar__right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hlt-sep { width: 1px; height: 22px; background: #e0e0e0; }
.hlt-search { padding: 5px 10px; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; outline: none; width: 180px; transition: border-color .2s; }
.hlt-search:focus { border-color: #1d9e75; }

/* Buttons */
.hlt-btn { font-size: 13px; padding: 6px 14px; border-radius: 6px; border: 1px solid #ddd; background: #fff; color: #1a1a1a; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: background .15s, border-color .15s; }
.hlt-btn:hover { background: #f5f5f5; border-color: #bbb; }
.hlt-btn:active { transform: scale(.98); }
.hlt-btn--primary { background: #1d9e75; border-color: #1d9e75; color: #fff; }
.hlt-btn--primary:hover { background: #178a64; border-color: #178a64; }
.hlt-btn--danger { color: #c0392b; border-color: #f5c6c6; }
.hlt-btn--danger:hover { background: #fdf2f2; }
.hlt-btn:disabled { opacity: .45; cursor: default; }

/* Select / Input */
.hlt-select { font-size: 13px; padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #1a1a1a; cursor: pointer; }
.hlt-select--full { width: 100%; }
.hlt-input { font-size: 13px; padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px; width: 100%; background: #fff; color: #1a1a1a; box-sizing: border-box; }
.hlt-input:focus { outline: none; border-color: #1d9e75; }
.hlt-upper { text-transform: uppercase; }

/* Notices */
.hlt-notice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 8px; }
.hlt-notice--warn    { background: #fff8ec; border: 1px solid #f5d87e; color: #7a5700; }
.hlt-notice--error   { background: #fdf2f2; border: 1px solid #f5c6c6; color: #c0392b; }
.hlt-notice--success { background: #f0faf6; border: 1px solid #9fdbc8; color: #0f6e56; }
.hlt-notice--info    { background: #eef5fc; border: 1px solid #a8ccee; color: #185fa5; }

/* Table – bricht aus dem Container aus damit alle Spalten sichtbar sind */
.hlt-app .hlt-table-wrap {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-top: 8px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    display: block;
    max-width: 100%;
    position: relative;
}
.hlt-app .hlt-table {
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
}
.hlt-app .hlt-table thead { background: #f7f7f7; }
.hlt-app .hlt-table th {
    padding: 8px 8px;
    text-align: left;
    font-weight: 500;
    color: #555;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
    user-select: none;
    background: #f7f7f7;
}
.hlt-app .hlt-table th[data-sort] { cursor: pointer; }
.hlt-app .hlt-table th[data-sort]:hover { color: #1a1a1a; }
.hlt-app .hlt-table th.hlt-sort-asc::after  { content: " ▲"; font-size: 10px; }
.hlt-app .hlt-table th.hlt-sort-desc::after { content: " ▼"; font-size: 10px; }
.hlt-app .hlt-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
    white-space: nowrap;
    font-size: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hlt-app .hlt-table tr:last-child td { border-bottom: none; }
.hlt-app .hlt-table tbody tr:hover td { background: #fafafa; }
.hlt-app .hlt-table tr.hlt-dupe td { background: #fff8f8; }
.hlt-app .hlt-table tr.hlt-selected td { background: #f0faf6; }

/* Badges */
.hlt-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.hlt-badge--cw   { background: #e6f1fb; color: #185fa5; }
.hlt-badge--ssb  { background: #eaf3de; color: #3b6d11; }
.hlt-badge--ft8  { background: #faeeda; color: #854f0b; }
.hlt-badge--ft4  { background: #faeeda; color: #854f0b; }
.hlt-badge--am   { background: #eeedfe; color: #534ab7; }
.hlt-badge--fm   { background: #fbeaf0; color: #993556; }
.hlt-badge--digi { background: #eeedfe; color: #534ab7; }
.hlt-badge--rtty { background: #f1efe8; color: #5f5e5a; }
.hlt-badge--other{ background: #f1efe8; color: #5f5e5a; }

.hlt-del-btn, .hlt-edit-btn { font-size: 13px; color: #aaa; cursor: pointer; padding: 2px 6px; border-radius: 4px; border: none; background: none; }
.hlt-del-btn:hover  { color: #c0392b; background: #fdf2f2; }
.hlt-edit-btn:hover { color: #185fa5; background: #eef5fc; }

/* Pagination */
.hlt-pagination { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #f0f0f0; font-size: 13px; color: #666; flex-wrap: wrap; }
.hlt-page-btn { padding: 4px 10px; border: 1px solid #ddd; border-radius: 5px; background: #fff; cursor: pointer; font-size: 13px; transition: background .15s; }
.hlt-page-btn:hover { background: #f5f5f5; }
.hlt-page-btn--active { background: #1d9e75; color: #fff; border-color: #1d9e75; }
.hlt-page-btn:disabled { opacity: .4; cursor: default; }

/* Modal */
.hlt-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.hlt-modal { background: #fff; border-radius: 10px; width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,.18); }
.hlt-modal__header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #e5e5e5; font-weight: 500; }
.hlt-modal__close { background: none; border: none; font-size: 16px; color: #888; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.hlt-modal__close:hover { background: #f5f5f5; }
.hlt-modal__body { padding: 16px 18px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hlt-modal__footer { padding: 12px 18px; border-top: 1px solid #e5e5e5; display: flex; justify-content: flex-end; gap: 8px; }

/* Cards */
.hlt-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.hlt-card__title { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.hlt-card__desc  { font-size: 13px; color: #666; margin-bottom: 1rem; line-height: 1.5; }

/* Form fields */
.hlt-field { display: flex; flex-direction: column; gap: 5px; }
.hlt-field--full { grid-column: 1 / -1; }
.hlt-label { font-size: 12px; font-weight: 500; color: #555; }
.hlt-checkbox-label { font-size: 13px; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.hlt-required { color: #c0392b; }

/* QSO Entry Grid */
.hlt-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 4px; }

/* Info box */
.hlt-info-box { font-size: 13px; padding: 10px 14px; border-radius: 7px; background: #eef5fc; border: 1px solid #a8ccee; color: #185fa5; line-height: 1.6; }

/* Convert grid */
.hlt-convert-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; margin-bottom: 12px; }

/* Merge list */
.hlt-merge-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.hlt-merge-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f7f7f7; border-radius: 6px; font-size: 13px; }
.hlt-merge-item__name { font-weight: 500; }
.hlt-merge-item__meta { color: #888; font-size: 12px; }

/* Validation */
.hlt-val-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.hlt-val-stat { background: #f7f7f7; border-radius: 8px; padding: 12px 14px; text-align: center; }
.hlt-val-stat__num { font-size: 24px; font-weight: 500; }
.hlt-val-stat__lbl { font-size: 12px; color: #666; margin-top: 2px; }
.hlt-val-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.hlt-val-item { font-size: 13px; padding: 8px 12px; border-radius: 6px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.hlt-val-item--error  { background: #fdf2f2; color: #c0392b; }
.hlt-val-item--warn   { background: #fff8ec; color: #7a5700; }
.hlt-val-item--info   { background: #eef5fc; color: #185fa5; }
.hlt-val-item--ok     { background: #f0faf6; color: #0f6e56; }

/* Statistics */
.hlt-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 1rem; }
.hlt-stat-card { background: #f7f7f7; border-radius: 8px; padding: 14px; }
.hlt-stat-card__val { font-size: 26px; font-weight: 500; }
.hlt-stat-card__lbl { font-size: 12px; color: #666; margin-top: 2px; }
.hlt-stats-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.hlt-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.hlt-bar-row__label { width: 70px; text-align: right; color: #555; flex-shrink: 0; }
.hlt-bar-track { flex: 1; height: 14px; background: #f0f0f0; border-radius: 99px; overflow: hidden; }
.hlt-bar-fill { height: 100%; border-radius: 99px; background: #1d9e75; transition: width .4s ease; }
.hlt-bar-row__count { width: 36px; font-size: 12px; color: #888; }

/* DXCC */
.hlt-dxcc-worked { color: #1d9e75; font-weight: 500; }
.hlt-dxcc-missing { color: #aaa; }
.hlt-dxcc-badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.hlt-dxcc-badge--worked  { background: #f0faf6; color: #0f6e56; border: 1px solid #9fdbc8; }
.hlt-dxcc-badge--missing { background: #f7f7f7; color: #888; border: 1px solid #ddd; }

/* Map */
.hlt-map-wrap { position: relative; border: 1px solid #e5e5e5; border-radius: 10px; overflow: hidden; background: #e8f0f8; }
.hlt-map-canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
.hlt-map-tooltip { position: absolute; background: rgba(0,0,0,.82); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; z-index: 10; }

/* Print preview */
.hlt-print-preview { border: 1px solid #e5e5e5; border-radius: 10px; padding: 1.5rem; margin-top: 12px; background: #fff; }
.hlt-print-preview table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hlt-print-preview th { background: #f0f0f0; padding: 6px 10px; text-align: left; font-weight: 500; border-bottom: 1px solid #ccc; }
.hlt-print-preview td { padding: 5px 10px; border-bottom: 1px solid #eee; }
.hlt-print-preview h1 { font-size: 18px; margin-bottom: 4px; }
.hlt-print-preview .hlt-print-meta { font-size: 12px; color: #666; margin-bottom: 1rem; }
.hlt-print-preview .hlt-print-statsrow { display: flex; gap: 20px; margin-bottom: 1rem; font-size: 13px; flex-wrap: wrap; }
.hlt-print-preview .hlt-print-stat { background: #f7f7f7; padding: 8px 14px; border-radius: 6px; }
.hlt-print-preview .hlt-print-stat strong { display: block; font-size: 18px; }

/* Empty state */
.hlt-empty-state { text-align: center; padding: 3rem 1rem; color: #888; font-size: 14px; }
.hlt-empty-state__icon { font-size: 36px; margin-bottom: 10px; }

/* Print media */
@media print {
    .hlt-tabs, .hlt-toolbar, .hlt-dropzone, .hlt-pagination,
    .hlt-card, button, select, input, .hlt-print-preview { border: none !important; box-shadow: none !important; }
    .hlt-print-preview { display: block !important; padding: 0; }
    body * { visibility: hidden; }
    #hlt-print-area, #hlt-print-area * { visibility: visible; }
    #hlt-print-area { position: absolute; left: 0; top: 0; width: 100%; }
}

/* Inline editing */
.hlt-cell-view { display:inline; cursor:pointer; }
.hlt-cell-view:hover { background:#f0faf6; border-radius:3px; outline:2px solid #1d9e75; outline-offset:1px; }
.hlt-cell-input { font-size:13px; padding:2px 6px; border:2px solid #1d9e75; border-radius:4px; width:100%; min-width:70px; max-width:140px; background:#fff; color:#1a1a1a; box-sizing:border-box; }
.hlt-cell-input:focus { outline:none; box-shadow:0 0 0 3px rgba(29,158,117,0.15); }
td:has(.hlt-cell-input[style*="display: "]:not([style*="none"])) { padding:4px 6px; }

/* Mass mutation panel */
.hlt-mass-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.hlt-mass-block { background:#fff; border:1px solid #e5e5e5; border-radius:8px; padding:12px 14px; }
.hlt-mass-block__title { font-size:13px; font-weight:500; color:#1a1a1a; margin-bottom:3px; }
.hlt-mass-block__desc  { font-size:12px; color:#888; line-height:1.4; }
@media (max-width:700px) { .hlt-mass-grid { grid-template-columns:1fr; } }

/* POTA / SOTA */
.hlt-pota-sota-wrap { padding: 4px 0; }
.hlt-inner-tab { font-size: 12px; padding: 6px 14px; border: none; background: none; color: #666; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 4px 4px 0 0; transition: color .15s; white-space: nowrap; }
.hlt-inner-tab:hover { color: #1a1a1a; }
.hlt-inner-tab--active { color: #1d9e75; border-bottom-color: #1d9e75; font-weight: 500; }
.hlt-pota-badge { display:inline-block; font-size:11px; padding:2px 8px; border-radius:99px; font-weight:500; }
.hlt-pota-badge--activator { background:#e6f1fb; color:#185fa5; }
.hlt-pota-badge--hunter    { background:#eaf3de; color:#3b6d11; }
.hlt-sota-badge--activator { background:#e6f1fb; color:#185fa5; }
.hlt-sota-badge--chaser    { background:#eaf3de; color:#3b6d11; }
.hlt-sota-badge--s2s       { background:#faeeda; color:#854f0b; }

/* Responsive */
@media (max-width: 700px) {
    .hlt-entry-grid   { grid-template-columns: 1fr 1fr; }
    .hlt-stats-grid   { grid-template-columns: 1fr 1fr; }
    .hlt-stats-charts { grid-template-columns: 1fr; }
    .hlt-convert-grid { grid-template-columns: 1fr; }
    .hlt-modal__body  { grid-template-columns: 1fr; }
    .hlt-val-summary  { grid-template-columns: 1fr 1fr; }
    .hlt-toolbar      { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
    .hlt-entry-grid { grid-template-columns: 1fr; }
    .hlt-tabs .hlt-tab { font-size: 12px; padding: 6px 8px; }
}
