*{
    box-sizing:border-box;
    margin:0;
    padding:0;
    font-family:'Segoe UI',Arial,sans-serif;
}

/* ================= BODY ================= */

body{
    background:linear-gradient(135deg,#0f172a,#1e293b);
    color:#f1f5f9;
    min-height:100vh;
    padding:30px;
}

.container{
    max-width:1200px;
    margin:auto;
}

/* ================= CARD ================= */

.card{
    background:#1e293b;
    padding:25px;
    border-radius:14px;
    margin-bottom:25px;
    box-shadow:0 10px 30px rgba(0,0,0,.4);
    border:1px solid #334155;
}

h2, h3{
    margin-bottom:15px;
}

/* ================= FORM ================= */

select,
input[type="number"],
input[type="text"],
input[type="password"],
input[type="date"]{
    padding:10px 14px;
    margin-bottom:14px;
    border-radius:8px;
    border:1px solid #334155;
    background:#0f172a;
    color:#f1f5f9;
    font-size:14px;
    outline:none;
    transition:0.2s ease;
}

.card select,
.card input:not([type="checkbox"]):not([type="radio"]){
    width:100%;
}

select:focus,
input:focus{
    border-color:#6366f1;
    box-shadow:0 0 0 3px rgba(99,102,241,0.3);
}

label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
    color:#cbd5e1;
}

/* ================= BUTTONS ================= */

button{
    padding:10px 16px;
    background:#6366f1;
    color:white;
    border:none;
    border-radius:8px;
    cursor:pointer;
    transition:0.2s;
}

button:hover{
    background:#4f46e5;
    transform:scale(1.03);
}

.btn-back{
    display:inline-block;
    padding:10px 16px;
    background:#334155;
    color:#f1f5f9;
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
    transition:0.2s;
    border:1px solid #475569;
}

.btn-back:hover{
    background:#6366f1;
    transform:scale(1.03);
}

/* ================= TABLE ================= */

table{
    width:100%;
    border-collapse:collapse;
    margin-top:15px;
}

th{
    background:#6366f1;
    padding:12px;
    text-align:left;
}

td{
    padding:10px;
    border-bottom:1px solid #334155;
}

tr:hover{
    background:#0f172a;
}

/* ================= LINKS ================= */

a{
    color:#60a5fa;
    text-decoration:none;
    font-weight:bold;
}

/* ================= HERO (alte Seiten) ================= */

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

.hero img{
    width:100%;
    max-width:900px;
    border-radius:20px;
    box-shadow:0 25px 60px rgba(0,0,0,.6);
}

/* ================= KONTO ================= */

.konto-liste{
    margin-top:10px;
}

.konto-zeile{
    display:flex;
    justify-content:space-between;
    padding:14px;
    border-bottom:1px solid #334155;
    cursor:pointer;
    align-items:center;
    transition:0.2s;
}

.konto-zeile:hover{
    background:#0f172a;
}

.konto-links{
    display:flex;
    flex-direction:column;
}

.konto-typ{
    font-weight:600;
}

.konto-datum{
    font-size:13px;
    color:#9ca3af;
}

.konto-betrag{
    font-weight:600;
    font-size:16px;
}

.konto-detail{
    display:none;
    padding:12px 15px;
    background:#0f172a;
    font-size:14px;
    color:#cbd5e1;
    border-bottom:1px solid #334155;
}

.konto-detail.open{
    display:block;
}

/* ========================================================= */
/* ================= DASHBOARD TOP (NEU) =================== */
/* ========================================================= */

.dashboard-top{
    display:grid;
    grid-template-columns: 620px 1fr;   /* Inseln größer */
    gap:40px;
    margin:30px 0 50px 0;
    align-items:start;
}

/* ================= INSELN CARD ================= */

.inseln-card{
    background:#0f172a;
    padding:30px;
    border-radius:20px;
    box-shadow:0 15px 35px rgba(0,0,0,0.45);
    min-height:560px;
    display:flex;
    flex-direction:column;
}

.inseln-card h3{
    margin-top:0;
    margin-bottom:20px;
    font-size:20px;
}

.inseln-table-wrapper{
    flex:1;
    overflow-y:auto;
    border-radius:12px;
}

.inseln-table{
    width:100%;
    border-collapse:collapse;
    font-size:15px;
}

.inseln-table thead{
    background:#1e293b;
    position:sticky;
    top:0;
}

.inseln-table th,
.inseln-table td{
    padding:12px;
}

.inseln-table tbody tr{
    border-bottom:1px solid #1e293b;
    transition:0.2s;
}

.inseln-table tbody tr:hover{
    background:#1e293b;
}

/* ================= HERO CARD ================= */

.hero-card{
    background:#0f172a;
    padding:40px;
    border-radius:20px;
    box-shadow:0 15px 35px rgba(0,0,0,0.45);
    display:flex;
    justify-content:center;
    align-items:center;
}

.hero-card img{
    max-width:60%;     /* Bild kleiner */
    height:auto;
    border-radius:16px;
    box-shadow:0 20px 50px rgba(0,0,0,0.6);
}

/* ================= RESPONSIVE ================= */

@media (max-width:1100px){
    .dashboard-top{
        grid-template-columns:1fr;
    }

    .hero-card img{
        max-width:80%;
    }
}

@media(max-width:900px){
    body{
        padding:15px;
    }
}

/* ========================================================= */
/* =============== EINHEITLICHER ADMINBEREICH ============== */
/* ========================================================= */

:root{
    color-scheme:dark;
    --admin-bg:#0f172a;
    --admin-panel:#1e293b;
    --admin-panel-dark:#111827;
    --admin-border:#334155;
    --admin-text:#f1f5f9;
    --admin-muted:#94a3b8;
    --admin-primary:#6366f1;
    --admin-primary-hover:#4f46e5;
    --admin-danger:#ef4444;
    --admin-danger-hover:#dc2626;
    --admin-success:#22c55e;
    --admin-warning:#f59e0b;
}

h1{
    margin:0 0 6px;
    font-size:clamp(24px,4vw,34px);
}

.admin-container{
    max-width:1180px;
}

.page-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:25px;
    padding:22px 24px;
    border:1px solid var(--admin-border);
    border-radius:14px;
    background:rgba(30,41,59,.92);
    box-shadow:0 10px 30px rgba(0,0,0,.32);
}

.compact-header{
    padding:0 0 20px;
    margin-bottom:20px;
    border:0;
    border-bottom:1px solid var(--admin-border);
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

.page-subtitle{
    margin:0;
    color:var(--admin-muted);
    line-height:1.5;
}

.admin-name{
    color:#60a5fa;
    font-weight:700;
}

.header-actions,
.button-group{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.section-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}

.section-heading h2,
.section-heading h3{
    margin-bottom:4px;
}

.nav-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:18px;
}

.nav-card{
    display:block;
    padding:28px 20px;
    border:1px solid var(--admin-border);
    border-radius:14px;
    background:var(--admin-panel);
    color:var(--admin-text);
    text-align:center;
    text-decoration:none;
    font-size:17px;
    line-height:1.8;
    box-shadow:0 8px 24px rgba(0,0,0,.3);
    transition:transform .2s ease,background .2s ease,border-color .2s ease;
}

.nav-card:hover{
    background:var(--admin-panel-dark);
    border-color:var(--admin-primary);
    transform:translateY(-4px);
}

.login-card{
    max-width:620px;
    margin:8vh auto 0;
}

.stack-form{
    display:flex;
    flex-direction:column;
}

.form-grid{
    display:grid;
    gap:16px;
    align-items:end;
}

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

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

.form-action{
    grid-column:1/-1;
}

.full-width{
    width:100%;
}

button,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.btn-warning{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:40px;
    padding:10px 15px;
    border:1px solid transparent;
    border-radius:8px;
    color:#fff;
    text-decoration:none;
    font-weight:700;
    cursor:pointer;
    transition:background .2s ease,transform .2s ease,border-color .2s ease,opacity .2s ease;
}

.btn-primary{
    background:var(--admin-primary);
}

.btn-primary:hover{
    background:var(--admin-primary-hover);
}

.btn-secondary{
    background:#334155;
    border-color:#475569;
}

.btn-secondary:hover{
    background:#475569;
}

.btn-danger{
    background:var(--admin-danger);
}

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

.btn-success{
    background:#15803d;
}

.btn-success:hover{
    background:#166534;
}

.btn-warning{
    background:#b45309;
}

.btn-warning:hover{
    background:#92400e;
}

.btn-small{
    min-height:34px;
    padding:7px 10px;
    font-size:13px;
}

button:disabled,
.btn-primary:disabled,
.btn-danger:disabled{
    opacity:.45;
    cursor:not-allowed;
    transform:none;
}

.table-wrap{
    width:100%;
    overflow-x:auto;
    border:1px solid var(--admin-border);
    border-radius:12px;
}

.table-wrap table,
.admin-table{
    margin-top:0;
    min-width:620px;
    table-layout:auto;
}

.admin-table th{
    background:#111827;
    color:#cbd5e1;
    font-size:13px;
    letter-spacing:.02em;
}

.admin-table td{
    vertical-align:middle;
}

.admin-table input,
.admin-table select{
    margin-bottom:0;
    min-width:130px;
}

.actions-column{
    width:1%;
    white-space:nowrap;
    text-align:right;
}

.actions-cell{
    text-align:right;
    white-space:nowrap;
}

.actions-cell .button-group{
    justify-content:flex-end;
}

.status-badge,
.badge{
    display:inline-flex;
    align-items:center;
    width:max-content;
    padding:4px 9px;
    border-radius:999px;
    border:1px solid #475569;
    background:#111827;
    color:#cbd5e1;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.status-badge.active{
    color:#bbf7d0;
    border-color:#166534;
    background:#14532d;
}

.status-badge.inactive{
    color:#fecaca;
    border-color:#991b1b;
    background:#7f1d1d;
}

.status-message{
    display:none;
    margin-top:14px;
    padding:11px 13px;
    border-radius:8px;
    border:1px solid transparent;
    line-height:1.45;
}

.status-message.info,
.status-message.ok,
.status-message.error{
    display:block;
}

.status-message.info{
    color:#bae6fd;
    background:#0c4a6e;
    border-color:#0369a1;
}

.status-message.ok{
    color:#bbf7d0;
    background:#14532d;
    border-color:#15803d;
}

.status-message.error{
    color:#fecaca;
    background:#7f1d1d;
    border-color:#b91c1c;
}

.empty-state{
    padding:24px !important;
    color:var(--admin-muted);
    text-align:center !important;
}

.danger-card{
    border-color:#7f1d1d;
}

.warning-box,
.info-box{
    margin:14px 0 18px;
    padding:14px 16px;
    border-radius:10px;
    line-height:1.55;
}

.warning-box{
    border-left:4px solid var(--admin-danger);
    background:#2b171b;
}

.info-box{
    border-left:4px solid #38bdf8;
    background:#102a3a;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
    gap:12px;
    margin:18px 0;
}

.stat-card{
    padding:13px;
    border:1px solid var(--admin-border);
    border-radius:10px;
    background:#111827;
}

.stat-card span{
    display:block;
    color:var(--admin-muted);
    font-size:12px;
}

.stat-card strong{
    display:block;
    margin-top:4px;
    font-size:23px;
}

.price-input{
    max-width:180px;
}

code{
    padding:2px 6px;
    border-radius:5px;
    background:#111827;
    color:#f8fafc;
}

/* Checkboxen dürfen in Tabellen niemals durch .card input auf 100 % wachsen. */
input[type="checkbox"],
input[type="radio"]{
    width:18px;
    height:18px;
    margin:0;
    accent-color:var(--admin-primary);
    cursor:pointer;
}

/* Seed-Sammelabrechnung */
.seed-card{
    border-color:#475569;
}

.seed-wrapper{
    overflow-x:auto;
    border:1px solid var(--admin-border);
    border-radius:12px;
    background:#0f172a;
}

.seed-table{
    width:100%;
    min-width:520px;
    margin:0;
    table-layout:auto;
}

.seed-table .col-check{
    width:58px;
}

.seed-table .col-name{
    width:auto;
}

.seed-table .col-value{
    width:190px;
}

.seed-table th,
.seed-table td{
    padding:12px 14px;
    overflow:visible;
    text-overflow:clip;
}

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

.seed-table th:last-child,
.seed-table td:last-child{
    text-align:right;
}

.seed-table tbody tr:hover{
    background:#111827;
}

.seed-table tfoot td{
    border-top:2px solid #475569;
    border-bottom:0;
    background:#111827;
    font-weight:800;
}

.seed-table .footer-label{
    text-align:right;
    color:#cbd5e1;
}

.seed-table .footer-value{
    text-align:right;
    color:#f8fafc;
    font-size:17px;
}

.seed-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:14px;
}

@media(max-width:760px){
    .page-header,
    .section-heading{
        align-items:stretch;
        flex-direction:column;
    }

    .header-actions{
        width:100%;
    }

    .header-actions > *{
        flex:1;
    }

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

    .button-group{
        flex-direction:column;
        align-items:stretch;
    }

    .actions-cell .button-group{
        min-width:150px;
    }
}

/* ========================================================= */
/* ===== DASHBOARD-ANORDNUNG WIE VOR DEM DESIGN-UPDATE ===== */
/* ========================================================= */

.admin-dashboard-container{
    max-width:1100px;
}

.admin-dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:25px;
}

.admin-dashboard-header h2{
    margin:0;
}

.admin-dashboard-user{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:14px;
    flex-wrap:wrap;
}

.admin-dashboard-grid{
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
}

/* ========================================================= */
/* ================= SPIELER-ADMINRECHTE =================== */
/* ========================================================= */

.permission-option{
    grid-column:1/-1;
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:14px 16px;
    border:1px solid var(--admin-border);
    border-radius:10px;
    background:#111827;
}

.permission-option input[type="checkbox"]{
    flex:0 0 auto;
    margin-top:3px;
}

.permission-option label{
    display:flex;
    flex-direction:column;
    gap:3px;
    margin:0;
    cursor:pointer;
}

.permission-option label span{
    color:var(--admin-muted);
    font-size:13px;
    font-weight:400;
    line-height:1.45;
}

.status-badge.admin{
    color:#ddd6fe;
    border-color:#7c3aed;
    background:#4c1d95;
}

.status-badge.neutral{
    color:#cbd5e1;
    border-color:#475569;
    background:#111827;
}

.spieler-table{
    min-width:900px;
}

@media(max-width:760px){
    .admin-dashboard-header{
        align-items:stretch;
        flex-direction:column;
    }

    .admin-dashboard-user{
        justify-content:space-between;
    }
}

/* ========================================================= */
/* ================= NEUE SPIELERÜBERSICHT ================= */
/* ========================================================= */
.player-admin-page{max-width:1280px;}
.player-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px;}
.summary-card{background:#1e293b;border:1px solid #334155;border-radius:12px;padding:16px 18px;display:flex;flex-direction:column;gap:6px;box-shadow:0 6px 18px rgba(0,0,0,.22);}
.summary-card span{color:#94a3b8;font-size:13px;}
.summary-card strong{font-size:26px;color:#f8fafc;}
.admin-user-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px;}
.admin-user-card{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;padding:14px;border:1px solid #334155;border-radius:11px;background:#0f172a;}
.admin-user-icon{font-size:24px;text-align:center;}
.admin-user-meta{font-size:12px;color:#94a3b8;margin-top:3px;}
.player-filter-row{display:grid;grid-template-columns:minmax(240px,1fr) 230px;gap:12px;margin:0 0 15px;}
.player-filter-row input,.player-filter-row select{margin:0;}
.compact-player-table{min-width:980px;}
.player-name-cell{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.player-last-booking{font-size:13px;color:#cbd5e1;white-space:nowrap;}
.player-actions{justify-content:flex-end;}

/* ========================================================= */
/* ============== FAVORITEN AUF DER STARTSEITE ============= */
/* ========================================================= */
.favorite-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.favorite-panel-heading h2{font-size:20px;margin:0 0 3px;}
.favorite-panel-heading span{font-size:12px;color:#94a3b8;line-height:1.35;display:block;}
.favorite-panel-heading a{padding:7px 10px;border-radius:8px;background:#334155;color:#fff;text-decoration:none;font-size:12px;white-space:nowrap;}
.favorite-islands-table{min-width:620px;}
.favorite-island-row{cursor:pointer;transition:background .15s,border-color .15s;}
.favorite-island-row:hover{background:#172033;}
.favorite-island-row.selected{background:#1e293b;box-shadow:inset 4px 0 0 #f59e0b;}
.favorite-empty{text-align:center!important;padding:28px 12px!important;color:#94a3b8;line-height:1.7;}
.favorite-empty a{color:#93c5fd;}
.booking-status{min-height:20px;margin-top:10px;font-size:13px;color:#94a3b8;line-height:1.4;}
.booking-status.ok{color:#86efac;}
.booking-status.error{color:#fca5a5;}
.booking-status.loading{color:#93c5fd;}

/* ========================================================= */
/* ================= INSELN SORTIEREN ====================== */
/* ========================================================= */
.island-sort-page{max-width:1050px;}
.island-sort-header{display:flex;justify-content:space-between;align-items:center;gap:16px;}
.island-sort-header h2{margin:0 0 5px;}
.favorite-help{display:flex;gap:10px;align-items:flex-start;border-color:#a16207;background:#29200c;}
.favorite-help span{color:#fde68a;line-height:1.5;}
.island-sort-list{display:flex;flex-direction:column;gap:9px;}
.island-sort-row{display:grid;grid-template-columns:34px 120px minmax(220px,1fr) 145px 90px;align-items:center;gap:12px;padding:12px 14px;border:1px solid #334155;border-radius:11px;background:#0f172a;transition:.15s;}
.island-sort-row.is-favorite{border-color:#a16207;background:#211a0c;}
.island-sort-row.dragging{opacity:.45;}
.drag-handle{font-size:20px;color:#64748b;cursor:grab;text-align:center;user-select:none;}
.favorite-switch{display:flex;align-items:center;gap:8px;margin:0;white-space:nowrap;cursor:pointer;}
.favorite-switch span{font-size:13px;font-weight:700;}
.island-sort-main{display:flex;flex-direction:column;min-width:0;}
.island-sort-main strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.island-sort-main span{font-size:12px;color:#94a3b8;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.island-seed-price{text-align:right;font-weight:800;white-space:nowrap;}
.island-seed-price small{display:block;color:#94a3b8;font-size:11px;font-weight:400;margin-top:2px;}
.island-order-buttons{display:flex;gap:6px;justify-content:flex-end;}
.island-order-buttons button{width:38px;padding:7px 0;}
.island-sort-actions{display:flex;justify-content:space-between;gap:12px;margin-top:18px;}

@media(max-width:900px){
  .player-summary-grid{grid-template-columns:1fr 1fr;}
  .island-sort-row{grid-template-columns:30px 110px 1fr 80px;}
  .island-seed-price{display:none;}
}
@media(max-width:650px){
  .player-filter-row{grid-template-columns:1fr;}
  .player-summary-grid{grid-template-columns:1fr 1fr;}
  .admin-user-card{grid-template-columns:36px 1fr;}
  .admin-user-card>.status-badge{grid-column:2;justify-self:start;}
  .island-sort-header{align-items:stretch;flex-direction:column;}
  .favorite-help{flex-direction:column;}
  .island-sort-row{grid-template-columns:28px 1fr auto;grid-template-areas:"drag main buttons" "favorite favorite favorite";}
  .drag-handle{grid-area:drag;}
  .island-sort-main{grid-area:main;}
  .island-order-buttons{grid-area:buttons;}
  .favorite-switch{grid-area:favorite;padding-top:8px;border-top:1px solid #334155;}
  .island-sort-actions{flex-direction:column;}
  .island-sort-actions button{width:100%;}
}
