/* ============================================================
   TimeSecPlan – Basis-Stylesheet
   Die mobilen Anpassungen stehen in mobile.css, die NACH
   dieser Datei geladen wird.
   ============================================================ */

:root {
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --primary: #3498db;
    --primary-dark: #2c3e50;
    --primary-sub: #9b59b6;
    --primary-sub-hover: #8e44ad;
    --danger: #e74c3c;
    --text: #2c3e50;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #dcdde1;
    --border-light: #e2e8f0;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.02);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --transition: all 0.2s ease-in-out;
}

/* ============================================================
   GRUNDGERÜST
   ============================================================ */
body {font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color:var(--bg-color); color:var(--text); margin:0; padding:0;}
/* Gilt für den einfachen Seitenkopf (z.B. scanner.php) UND als Flex-Basis
   für .main-header – beide Regeln greifen dort gemeinsam. */
header {background:#2c3e50; color:white; padding:15px 30px; display:flex; justify-content:space-between; align-items:center;}
.container {max-width:80%; margin:30px auto; padding:0 15px;}
.card {background:var(--card-bg); padding:25px; border-radius:8px; box-shadow:0 4px 6px rgba(0,0,0,0.1); margin-bottom:30px;}
.inline-form {display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap;}
input, select, button {padding:10px; border:1px solid var(--border); border-radius:4px; font-size:14px;}
button {background:var(--primary); color:white; border:none; cursor:pointer;}
button:hover { opacity:0.9; }
table {width:100%; border-collapse:collapse; margin-top:10px;}
th, td {padding:12px; text-align:left; border-bottom:1px solid var(--border);}
th { background:#f8f9fa; }

/* ============================================================
   STATUS-ABZEICHEN UND BUTTONS
   ============================================================ */
.badge { padding:5px 10px; border-radius:4px; font-weight:bold; font-size:12px; color:white; display:inline-block; }
.badge-present { background-color:#2ecc71; }
.badge-absent { background-color:#7f8c8d; }
.btn-edit { background:#f1f2f6; color:var(--text); padding:6px 10px; border-radius:4px; cursor:pointer; }
.btn-maps { text-decoration:none; color:#44bd32; font-weight:bold; }

/* ============================================================
   LOGIN-LAYOUT
   ============================================================ */
.login-body { display:flex; justify-content:center; align-items:center; height:100vh; background:#2c3e50; }
.login-card { background:white; padding:40px; border-radius:8px; width:300px; }
.login-card form { display:flex; flex-direction:column; gap:15px; }

/* ============================================================
   BENUTZERVERWALTUNG – EINGABEFELDER MIT SCHWEBENDEM LABEL
   ============================================================ */
.input-wrapper { position:relative; margin-top:20px; width:400px; }
.input-wrapper input { width:100%; padding:12px; border:2px solid #ccc; border-radius:4px; font-size:16px; outline:none; }
.input-wrapper label { position:absolute; left:12px; top:-10px; background-color:white; padding:0 5px; font-size:14px; color:#666; }
.input-wrapper input:focus { border-color:#007bff; }
.input-wrapper input:focus + label { color:#007bff; }
.select-wrapper { position: relative; ;margin-top: 20px; ;width: 400px; }
.select-wrapper select { width: 100%; ;padding: 12px; ;border: 2px solid #ccc; ;border-radius: 4px; ;font-size: 16px; ;outline: none; ;background-color: white; ;cursor: pointer; ;appearance: none; /* Entfernt das Standard-Design des Browsers */ ;-webkit-appearance: none;}
.select-wrapper label { position: absolute; ;left: 12px; ;top: -10px; /* Verschiebt das Label hoch auf den Rahmen */ ;background-color: white; /* Überdeckt die Rahmenlinie */ ;padding: 0 5px; /* Schafft Platz links und rechts vom Text */ ;font-size: 14px; ;color: #666; ;pointer-events: none; /* Klicks gehen durch das Label hindurch auf das Select-Feld */}
.select-wrapper select:focus { border-color: #007bff;}
.select-wrapper select:focus + label { color: #007bff;}

/* ============================================================
   QR-VERWALTUNG
   ============================================================ */
.qr-canvas-container { display:flex; flex-direction:column; align-items:center; justify-content:center; background:#fff; padding:10px; border:1px solid #eee; border-radius:4px; }
.btn-print { background:#27ae60; color:white; padding:5px 10px; border:none; border-radius:4px; cursor:pointer; font-size:12px; margin-top:5px; text-decoration:none; display:inline-block; }

/* ============================================================
   OBJEKT-ÜBERSICHT (object_schedule_list.php)
   ============================================================ */
.object-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:20px; margin-top:20px; }
.object-card { background:var(--card-bg); text-align:center; padding:30px; border-radius:8px; border-top:4px solid var(--primary); box-shadow:0 4px 6px rgba(0,0,0,0.1); }
.object-card:hover {transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); border-top: 4px solid #27ae60; }
.object-card a { display: inline-block; margin-top: 15px; background: var(--primary); color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; font-weight: bold; }
.object-card a:hover { background: #27ae60; }
.object-info h3 {margin: 0 0 8px 0; color: #2c3e50;font-size: 18px;}
.object-info p {margin: 0 0 15px 0; color: #7f8c8d;font-size: 12px;}
.btn-calendar {display: block;text-align: center;background: #2980b9;color: white;text-decoration: none;padding: 10px;border-radius: 4px}
.btn-calendar:hover {background: #2471a3;}
.no-objects { text-align: center;color: #7f8c8d;padding: 40px;background: #ffffff;border-radius: 6px;border: 1px solid var(--border);}

/* ============================================================
   LOGIN-PROTOKOLL (view_login_logs.php)
   ============================================================ */
.badge-success { background-color: #2ecc71; }
.badge-failed { background-color: #e74c3c; }
.row-failed { background-color: #fff5f5; }
.ip-warning { color: #d32f2f; background-color: #ffebee; padding: 4px 8px; border-radius: 4px; font-weight: bold; border: 1px solid #ffcdd2; display: inline-block;}
.ip-normal { color: #2c3e50;font-family: monospace;}

/* ============================================================
   SCHICHTKALENDER (object_calendar_manage.php)
   ============================================================ */
.shift-badge { background: #f1f2f6; font-size: 11px; padding: 8px; border-radius: 4px; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; border-left: 3px solid var(--primary); }
.btn-shift-action { background: none; border: none; cursor: pointer; padding: 0; font-size: 13px; }

/* ============================================================
   SCHICHTLISTEN (view_main_shifts.php / view_my_shifts.php)
   ============================================================ */
.calendar-list-container {display: flex; flex-direction: column; gap: 8px; margin-top: 20px;}
.day-list-row {background: #ffffff; border: 1px solid var(--border-light); border-radius: 6px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 20px; box-shadow: var(--shadow-soft);}
.day-list-row.today {border-color: var(--primary-sub); background: #faf0fc;}
.day-title-shift {font-weight: bold; min-width: 140px; flex-shrink: 0; display: flex; align-items: center; gap: 15px;}
.day-number {font-size: 24px; font-weight: bold; min-width: 35px; text-align: right;}
.day-number.weekend {color: var(--text-muted);}
.day-number.workday {color: var(--text-dark);}
.month-label {font-size: 14px; font-weight: bold; display: block; color: var(--text-dark);}
.weekday-label {font-size: 12px;}
.weekday-label.weekend {color: #e74c3c;}
.weekday-label.workday {color: var(--text-muted);}
.shifts-wrapper {flex: 1; display: flex; flex-direction: column; gap: 6px;}
.no-shifts-text {color: var(--text-muted); font-size: 13px; font-style: italic;}
.shifts-inner-list {display: flex; flex-direction: column; gap: 5px; width: 100%;}
.shift-badge-sub {background: #faf0fc; font-size: 11px; padding: 8px 12px; border-radius: 4px; border-left: 4px solid var(--primary-sub); display: flex; align-items: center; justify-content: space-between; gap: 15px; flex: 1;}
.shift-info-meta {display: flex; align-items: center; gap: 20px; flex-wrap: wrap; flex: 1;}
.location-name {font-size: 13px; font-weight: bold; color: var(--text-dark);}
.time-range {font-size: 13px; font-weight: bold; color: var(--text-dark);}
.overnight-icon {color: var(--primary-sub); font-size: 11px;}
.actions-and-status {display: flex; gap: 15px; align-items: center; flex-shrink: 0;}
.live-counter {background: var(--primary-sub); color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; flex-shrink: 0;}
.live-counter.full {background: #e74c3c;}
.btn-assign {text-decoration: none; padding: 5px 12px; font-size: 12px; background: var(--primary-sub); color: white; font-weight: bold; border-radius: 4px; transition: background 0.2s;}
.btn-assign:hover {background: var(--primary-sub-hover);}
.filter-flex-container {display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;}
.filter-form-wrapper {display: flex; gap: 15px; align-items: center; flex-wrap: wrap; width: 100%; max-width: 500px;}
.filter-input-group {flex: 1; min-width: 250px;}
.filter-input-group label {font-size: 11px; font-weight: bold; color: #555; text-transform: uppercase; display: block; margin-bottom: 4px;}
.filter-select {border: 1px solid #dcdde1; padding: 8px; border-radius: 4px; width: 100%; background: white; font-size: 13px; font-weight: bold; cursor: pointer;}
.navigator-wrapper {display: flex; align-items: center;}
.navigator-current {margin: 0 15px; font-size: 15px; color: var(--text-dark); background: #eef2f5; padding: 6px 15px; border-radius: 20px;}

/* ============================================================
   FEHLGESCHLAGENE SCANS (view_failed_scans.php)
   ============================================================ */
.reason-text { color: #c0392b; font-weight: 500; }
.danger-card { border-top: 4px solid #e74c3c; }

/* ============================================================
   SCHICHTZUWEISUNG (object_shift_assign.php)
   ============================================================ */
.info-panel {background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);border-left: 5px solid #2980b9;padding: 20px;border-radius: 8px;margin-bottom: 25px;box-shadow: var(--card-shadow);}
.info-panel h2 {margin: 0 0 5px 0;color: var(--primary-dark);font-size: 22px;}
.info-panel p {margin: 0;color: #4a5568;font-size: 15px;font-weight: 500;}
.info-panel .highlight {color: #2b6cb0;}
.slot-grid {display: grid;grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));gap: 20px;margin-top: 15px;}
.slot-card {background: #ffffff;border: 1px solid var(--border-light);border-radius: 10px;padding: 20px;box-shadow: var(--card-shadow);display: flex;flex-direction: column;gap: 15px;position: relative;transition: var(--transition);}
.slot-card:hover {transform: translateY(-2px);box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);}
.form-group-shift {display: flex;flex-direction: column;gap: 6px;}
.form-group-shift label {font-size: 11px;font-weight: bold;text-transform: uppercase;color: var(--text-muted);letter-spacing: 0.5px;}
.form-control {width: 100%;padding: 10px;border-radius: 6px;border: 1px solid #cbd5e0;background-color: #ffffff;font-size: 14px;color: var(--text-dark);box-sizing: border-box;transition: var(--transition);}
.form-control:focus {outline: none;border-color: #3182ce;box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);}
.live-worker-text {font-size: 15px;font-weight: bold;padding: 4px 0;}
.option-blocked {color: #c0392b;background: #fdf2f2;}
.badge-shift {display: inline-flex;align-items: center;padding: 6px 12px;border-radius: 20px;font-size: 11px;font-weight: bold;text-transform: uppercase;width: fit-content;}
.badge-success-shift {background: #2ecc71;color: white;}
.submit-btn {background: #27ae60;color: white;border: none;padding: 14px 35px;font-size: 16px;font-weight: bold;border-radius: 50px;cursor: pointer;box-shadow: 0 4px 6px rgba(39, 174, 96, 0.2);transition: var(--transition);display: block;margin: 30px 0 0 auto;}
.submit-btn:hover {background: #219653;transform: translateY(-1px);box-shadow: 0 6px 12px rgba(39, 174, 96, 0.25);}
/* Status-Zustände für Karten */
.slot-card.status-live {border-color: #2ecc71;background: #f4fbf7;}
.slot-card.status-beendet {border-color: #ff0000;background: #f7cfcf;opacity: 0.85;}
.slot-number {position: absolute;top: 15px;right: 15px;background: #edf2f7;color: #4a5568;font-size: 11px;font-weight: bold;padding: 4px 8px;border-radius: 20px;}
.slot-title {font-size: 16px;font-weight: bold;color: var(--text-dark);margin: 0;display: flex;align-items: center;gap: 8px;}

/* ============================================================
   SCANNER-ANZEIGE (scanner.php)
   ============================================================ */
.action-indicator { padding:15px; margin-bottom:15px; border-radius:6px; font-weight:bold; font-size:18px; text-align:center; }
.status-check_in { background:#e3f2fd; color:#0d47a1; border:2px solid #1e88e5; }
.status-check_out { background:#ffebee; color:#b71c1c; border:2px solid #e53935; }

/* ============================================================
   LIVE-STATUS (live_status.php)
   ============================================================ */
.stats-container { display:flex; gap:20px; margin-bottom:20px; }
.stats-box { background:#fff; padding:15px 25px; border-radius:6px; border-left:5px solid var(--primary); box-shadow:0 2px 5px rgba(0,0,0,0.05); }
.stats-box.active { border-left-color:#2ecc71; }
.stats-number { font-size:24px; font-weight:bold; margin-top:5px; }

/* ============================================================
   OBJEKT-AUSWERTUNG (view_object_reports.php)
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.mini-card { background: #f8f9fa; padding: 15px; border-radius: 6px; border: 1px solid var(--border); text-align: center; }
.mini-card h4 { margin: 0 0 5px 0; font-size: 11px; text-transform: uppercase; color: #7f8c8d; }
.mini-card p { margin: 0; font-size: 18px; font-weight: bold; }
.live-pulse { display: inline-block; width: 8px; height: 8px; background: #2ecc71; border-radius: 50%; margin-right: 5px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }

/* ============================================================
   DASHBOARD-MENÜ (dashboard.php)
   ============================================================ */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.menu-box { text-align: center; padding: 30px; border-top: 4px solid var(--primary); }
.menu-box:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); border-top: 4px solid #27ae60; }
.menu-box a { display: inline-block; margin-top: 15px; background: var(--primary); color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; font-weight: bold; }
.menu-box a:hover { background: #27ae60; }

/* ============================================================
   FILTERMASKEN (view_logs_admin.php / view_object_reports.php)
   ============================================================ */
.filter-card { background:#f8f9fa; border:1px solid var(--border); padding:15px; margin-bottom:20px; border-radius:6px; }
.filter-form { display:flex; gap:15px; flex-wrap:wrap; align-items:flex-end; }
.filter-group { display:flex; flex-direction:column; gap:5px; }
.filter-group label { font-size:12px; font-weight:bold; color:#555; }
.btn-reset { background:#7f8c8d; color:white; text-decoration:none; padding:10px 15px; border-radius:4px; font-size:14px; text-align:center; }

/* ============================================================
   SPINNER FÜR LOGOUT (logout.php)
   ============================================================ */
.logout-box { text-align:center; padding:30px; }
.spinner { border:4px solid rgba(0,0,0,0.1); width:36px; height:36px; border-radius:50%; border-left-color:#3498db; animation:spin 1s linear infinite; margin:20px auto; }
@keyframes spin { 0% { transform:rotate(0deg); } 100% { transform:rotate(360deg); } }

/* ============================================================
   MODAL-FENSTER
   ============================================================ */
.modal {display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(44, 62, 80, 0.7); backdrop-filter:blur(4px); justify-content:center; align-items:center; z-index:9999; padding:20px; box-sizing:border-box;}
.modal-content {background:var(--card-bg); padding:35px; border-radius:8px; width:100%; max-width:500px; max-height:90vh; overflow-y:auto; box-shadow:0 10px 25px rgba(0,0,0,0.2); animation:modalFadeIn 0.3s ease-out;}
.modal-content h3 {margin-top:0; margin-bottom:25px; color:var(--text); font-size:22px; border-bottom:2px solid var(--border); padding-bottom:10px;}
.modal-content label {font-weight:bold; font-size:13px; color:#555; margin-bottom:-5px; grid-column:span 2;}
.modal-content input {width:100%; box-sizing:border-box; padding:12px; font-size:15px;}
.modal-content input[type="email"] {grid-column:span 2;}
.modal-actions {grid-column:span 2; display:flex; justify-content:flex-end; gap:12px; margin-top:20px; border-top:1px solid var(--border); padding-top:20px;}
.modal-actions button {padding:12px 25px; font-size:15px; font-weight:bold;}
@keyframes modalFadeIn {
    from { opacity:0; transform:translateY(-20px); }
    to { opacity:1; transform:translateY(0); }
}

/* ============================================================
   HEADER UND NAVIGATION
   ============================================================ */
.main-header {background-color:#2c3e50; box-shadow:0 2px 10px rgba(0,0,0,0.15); position:sticky; top:0; z-index:9999; font-family:'Segoe UI', Arial, sans-serif;}
.header-container {max-width:80%; margin:0 auto; display:flex; justify-content:space-between; align-items:center; padding:0 20px; height:65px;}
/* Navigations-Struktur */
.nav-bar {height:100%;}
.nav-menu {list-style:none; margin:0; padding:0; display:flex; height:100%; align-items:center;}
.nav-menu > li {position:relative; height:100%; display:flex; align-items:center;}
.nav-menu > li > a,
.dropdown-trigger {color:#ecf0f1; text-decoration:none; padding:0 20px; height:100%; display:flex; align-items:center; font-weight:500; font-size:15px; transition:background 0.2s, color 0.2s; cursor:pointer;}
.nav-menu > li:hover > a,
.dropdown-trigger:hover {background-color:#34495e; color:#3498db;}
/* Dropdown-Logik */
.dropdown-menu {position:absolute; top:65px; left:0; background-color:#ffffff; min-width:240px; box-shadow:0 8px 16px rgba(0,0,0,0.15); list-style:none; padding:10px 0; margin:0; border-radius:0 0 6px 6px; border-top:3px solid #3498db; opacity:0; visibility:hidden; transform:translateY(10px); transition:opacity 0.2s, transform 0.2s, visibility 0.2s;}
.dropdown-menu li a {color:#2c3e50; padding:12px 20px; text-decoration:none; display:block; font-size:14px; font-weight:400; transition:background 0.15s, color 0.15s;}
.dropdown-menu li a:hover {background-color:#f8fafc; color:#3498db; padding-left:25px;}
.dropdown:hover .dropdown-menu {opacity:1; visibility:visible; transform:translateY(0);}
/* Rechte Zone: Benutzer und Logout */
.user-status-zone {display:flex; align-items:center; gap:15px;}
.user-badge {font-size:12px; font-weight:bold; padding:5px 10px; border-radius:20px; color:white;}
.user-badge.admin { background-color:#e74c3c; }
.user-badge.subcontractor { background-color:#f39c12; }
/* Diese drei Rollen hatten bisher keine Farbe und damit keine erkennbare Plakette */
.user-badge.dispatcher { background-color:#2980b9; }
.user-badge.view { background-color:#7f8c8d; }
.user-badge.employee { background-color:#27ae60; }
.btn-logout {color:#95a5a6; text-decoration:none; font-size:14px; padding:8px 12px; border:1px solid #7f8c8d; border-radius:4px; transition:all 0.2s;}
.btn-logout:hover {color:#ffffff; background-color:#c0392b; border-color:#c0392b;}
/* Hamburger-Button (auf dem Desktop ausgeblendet) */
.menu-toggle {display:none; flex-direction:column; justify-content:space-between; width:30px; height:21px; background:transparent; border:none; cursor:pointer; padding:0; z-index:10000;}
.menu-toggle span {width:100%; height:3px; background-color:#ffffff; border-radius:2px; transition:all 0.3s ease-in-out;}
/* Animation zum "X", wenn aktiv */
.menu-toggle.toggle-active span:nth-child(1) {transform:translateY(9px) rotate(45deg);}
.menu-toggle.toggle-active span:nth-child(2) {opacity:0;}
.menu-toggle.toggle-active span:nth-child(3) {transform:translateY(-9px) rotate(-45deg);}

/* ------------------------------------------------------------
   Navigation auf Smartphones und Tablets
   (weitere mobile Korrekturen stehen in mobile.css)
   ------------------------------------------------------------ */
@media (max-width:992px) {
    .menu-toggle {display:flex;}
    .header-container {justify-content:space-between;}
    /* Versteckt die Navigation standardmäßig außerhalb des Bildschirms */
    .nav-bar {position:absolute; top:65px; left:0; width:100%; background-color:#2c3e50; flex-direction:column; align-items:stretch; max-height:0; overflow:hidden; transition:max-height 0.3s ease-in-out; box-shadow:0 4px 10px rgba(0,0,0,0.2);}
    /* Wird per JavaScript vergeben, um das Menü auszurollen */
    .nav-bar.nav-active {max-height:90vh; overflow-y:auto;}
    .nav-menu {flex-direction:column; width:100%; gap:0;}
    .nav-menu > li {width:100%; border-bottom:1px solid #34495e;}
    .nav-menu > li > a,
    .dropdown-trigger {padding:15px 20px; width:100%; box-sizing:border-box; justify-content:space-between;}
    /* Mobiles Dropdown-Verhalten: per Klick einblenden */
    .dropdown-menu {position:relative; top:0; width:100%; background-color:#1a252f; box-shadow:none; border-top:none; border-left:4px solid var(--primary); border-radius:0; display:none; transform:none; opacity:1; visibility:visible; padding:5px 0;}
    .dropdown.dropdown-active .dropdown-menu {display:block;}
    .dropdown-menu li a {color:#ecf0f1; padding:12px 35px;}
    .user-status-zone {width:100%; padding:20px; box-sizing:border-box;}
}

/* ============================================================
   OBJEKT-FORMULAR (object_management.php)
   ============================================================ */
.object-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 30px; width: 100%;}
.object-form-left,
.object-form-right { min-width: 0;}
/* Formularfelder */
.form-group { margin-bottom: 18px;}
.form-group label { display: block; margin-bottom: 6px; font-weight: bold;}
.label-hint { font-weight: normal; color: #777; font-size: 13px;}
.form-group input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 15px; background: #fff;}
.form-group input:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.12);}
/* Latitude + Longitude */
.coordinates-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px;}
/* Adresssuche */
.address-search-row { display: flex; gap: 8px;}
.address-search-row input { flex: 1; min-width: 0;}
.address-search-button { flex-shrink: 0; padding: 10px 18px; border: none; border-radius: 5px; background: #2980b9; color: white; font-size: 15px; cursor: pointer;}
.address-search-button:hover { background: #2471a3;}
.address-search-button:disabled { background: #95a5a6; cursor: wait;}
.address-status { min-height: 20px; margin-top: 7px; font-size: 13px; color: #666;}
/* Karte */
.map-wrapper { margin-top: 5px;}
.map-hint { margin-bottom: 7px; color: #666; font-size: 13px;}
#object-map { width: 100%; height: 430px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);}
/* Button "Objekt anlegen" */
.object-submit-button { margin-top: 5px; padding: 11px 22px; border: none; border-radius: 5px; background: #27ae60; color: white; font-size: 15px; cursor: pointer;}
.object-submit-button:hover { background: #219150;}

/* Tablet / kleinere Bildschirme */
@media (max-width: 900px) {
    .object-form-grid { grid-template-columns: 1fr; }
    #object-map { height: 400px; }
}
/* Handy */
@media (max-width: 600px) {
    .coordinates-row { grid-template-columns: 1fr; }
    .address-search-row { flex-direction: column; }
    .address-search-button { width: 100%; }
    #object-map { height: 350px; }
}

/* ============================================================
   ANMELDE- UND KONTOSEITEN
   forgot_password.php, reset_password.php, change_password.php
   Vorher lagen diese Regeln als <style>-Block in den Seiten.
   ============================================================ */
.auth-body { display:flex; justify-content:center; padding:40px 20px; box-sizing:border-box; }
/* max-width schließt hier dank box-sizing die 30px Innenabstand mit ein;
   460/360 entsprechen damit exakt der bisherigen Darstellung. */
.auth-card { background:#ffffff; padding:30px; border-radius:8px; box-shadow:0 4px 10px rgba(0,0,0,0.1); width:100%; max-width:460px; box-sizing:border-box; }
/* Schmalere Variante für die PIN-Anforderung */
.auth-card.narrow { max-width:360px; }
.auth-card h2 { margin-top:0; color:#2c3e50; font-size:22px; }
.auth-card label { display:block; margin-bottom:5px; font-weight:bold; color:#34495e; }
.auth-card input[type="password"],
.auth-card input[type="email"] { width:100%; padding:10px; margin:10px 0; border:1px solid #bdc3c7; border-radius:4px; box-sizing:border-box; font-size:16px; }
.auth-card .form-group { margin-bottom:15px; }
.user-info { background:#ebf5fb; padding:10px; border-radius:4px; margin-bottom:20px; font-size:14px; color:#2980b9; }
.back-link { display:block; text-align:center; margin-top:15px; color:#7f8c8d; text-decoration:none; }
.back-link:hover { text-decoration:underline; }

/* Breiter Formular-Button dieser Seiten */
.btn { background:#3498db; color:white; border:none; padding:12px; width:100%; font-size:16px; font-weight:bold; border-radius:4px; cursor:pointer; margin-top:10px; display:block; box-sizing:border-box; }
.btn:hover { background:#2980b9; }
/* Grüne Variante zum Speichern (reset_password.php) */
.btn-save { background:#2ecc71; }
.btn-save:hover { background:#27ae60; }

/* Meldungsstreifen */
.alert { padding:12px; border-radius:4px; margin-bottom:15px; font-weight:bold; }
.alert-danger { background:#f2dede; color:#a94442; }
.alert-success { background:#dff0d8; color:#3c763d; }

/* ============================================================
   BUCHUNGSBESTÄTIGUNG UND SCAN-FEHLER
   success.php, error.php
   Die Akzentfarbe von success.php hängt von Check-In/Check-Out ab
   und wird als --accent direkt am Element gesetzt.
   ============================================================ */
.success-card,
.error-card { text-align:center; padding:40px 20px; }
.success-card { border-top:5px solid var(--accent, #44bd32); }
.error-card { border-top:5px solid #e74c3c; }
.success-icon { font-size:50px; color:var(--accent, #44bd32); margin-bottom:15px; }
.error-icon { font-size:50px; color:#e74c3c; margin-bottom:15px; }
.time-box { background:#f8f9fa; border:1px solid #dcdde1; padding:15px; border-radius:6px; margin:20px 0; font-size:16px; color:#2c3e50; }

/* ============================================================
   IMPRESSUM UND DATENSCHUTZ (datenschutz.php)
   Über die Body-Klasse .page-legal gekapselt, weil diese Seite
   .container sowie die Überschriften global überschrieben hat.
   ============================================================ */
.page-legal { line-height:1.6; color:#334155; background-color:#f8fafc; padding:40px 20px; }
.page-legal .container { max-width:850px; margin:0 auto; background:#ffffff; padding:40px; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,0.05); border:1px solid #e2e8f0; }
.page-legal h1 { color:#1e293b; font-size:28px; border-bottom:3px solid #3498db; padding-bottom:12px; margin-top:0; margin-bottom:30px; }
.page-legal h2 { color:#1e293b; font-size:20px; margin-top:40px; margin-bottom:15px; border-bottom:1px solid #e2e8f0; padding-bottom:5px; }
.page-legal h3 { color:#2c3e50; font-size:16px; margin-top:20px; margin-bottom:10px; }
.page-legal p,
.page-legal ul { margin-bottom:15px; }
.page-legal ul { padding-left:20px; }
.page-legal li { margin-bottom:5px; }
.highlight-box { background-color:#f1f5f9; padding:15px 20px; border-left:4px solid #3498db; border-radius:4px; margin:20px 0; line-height:1.8; }
.btn-back { display:inline-block; background-color:#3498db; color:#ffffff; text-decoration:none; padding:10px 20px; border-radius:4px; font-weight:bold; font-size:14px; transition:background 0.2s; margin-bottom:30px; }
.btn-back:hover { background-color:#2980b9; }
.nav-links { margin-bottom:25px; font-weight:bold; }
.nav-links a { color:#3498db; text-decoration:none; margin-right:15px; }
.nav-links a:hover { text-decoration:underline; }
@media (max-width: 600px) {
    .page-legal { padding:20px 10px; }
    .page-legal .container { padding:20px; }
}

/* ============================================================
   STUNDENZETTEL (view_timesheet.php)
   ============================================================ */
.timesheet-table { width:100%; border-collapse:collapse; margin-top:15px; font-size:13px; }
.timesheet-table th,
.timesheet-table td { border:1px solid #e2e8f0; padding:10px; text-align:left; }
.timesheet-table th { background:#f8f9fa; font-weight:bold; color:#2c3e50; }
.timesheet-table tr.weekend { background:#fcfcfc; }
.timesheet-table tr.today { background:#f1f9ff; font-weight:500; }
.badge-status { padding:3px 8px; border-radius:20px; font-size:11px; font-weight:bold; text-transform:uppercase; display:inline-block; }
.badge-krank { background:#fde8e8; color:#c0392b; }
.badge-urlaub { background:#e1f5fe; color:#2980b9; }
.badge-fehl { background:#fef5e7; color:#d35400; }
.summary-card { background:#2c3e50; color:white; padding:20px; border-radius:6px; margin-top:25px; display:flex; justify-content:space-between; align-items:center; }
.print-btn-container { display:flex; justify-content:flex-end; margin-top:15px; }
/* Bewusst über den Container gekapselt, damit der kleinere
   .btn-print der QR-Verwaltung unverändert bleibt. */
.print-btn-container .btn-print { padding:8px 18px; font-size:13px; margin-top:0; display:inline-flex; align-items:center; gap:8px; box-shadow:0 2px 4px rgba(0,0,0,0.05); transition:background 0.2s; }
.print-btn-container .btn-print:hover { background:#219653; }
/* Unterschriftenfelder erscheinen ausschließlich auf dem Ausdruck */
.print-signatures { display:none; margin-top:50px; }

/* ------------------------------------------------------------
   Druckansicht des Stundenzettels
   Nur wirksam auf Seiten mit <body class="page-timesheet">,
   damit das Drucken anderer Seiten unberührt bleibt.
   ------------------------------------------------------------ */
@media print {
    /* 1. Unwichtige Elemente für das Papier komplett unsichtbar machen */
    .page-timesheet header,
    .page-timesheet .card:first-of-type,
    .page-timesheet .btn-print,
    .page-timesheet .print-btn-container,
    .page-timesheet .btn-logout { display:none !important; }

    /* 2. Layout für Papier-Seitenränder optimieren */
    body.page-timesheet { background:white !important; color:black !important; margin:0; padding:0; font-size:12px; }
    .page-timesheet .container { width:100% !important; max-width:100% !important; margin:0 !important; padding:0 !important; box-shadow:none !important; }
    .page-timesheet .card { border:none !important; padding:0 !important; box-shadow:none !important; background:transparent !important; }

    /* 3. Tabelle für Schwarz-Weiß-Druck schärfen */
    .page-timesheet .timesheet-table { width:100% !important; margin-top:10px !important; font-size:11px !important; }
    .page-timesheet .timesheet-table th { background:#eaeded !important; color:black !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    .page-timesheet .timesheet-table tr.weekend { background:transparent !important; }

    /* 4. Zusammenfassung kompakt fixieren */
    .page-timesheet .summary-card { background:#eaeded !important; color:black !important; border:1px solid #bdc3c7 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; margin-top:15px !important; padding:10px 15px !important; }
    .page-timesheet .summary-card p { color:#555 !important; }
    .page-timesheet .summary-card div:last-child { background:transparent !important; color:black !important; padding:0 !important; }

    /* 5. Unterschriften-Felder exklusiv auf dem Papier einblenden */
    .page-timesheet .print-signatures { display:flex !important; justify-content:space-between; gap:50px; width:100%; }
    .page-timesheet .signature-box { flex:1; border-top:1px solid black; text-align:center; padding-top:8px; font-size:12px; margin-top:40px; }
}

/* ============================================================
   CHECK-IN/OUT-PROTOKOLL (view_logs_admin.php)
   ============================================================ */
.geo-link { font-size:11px; text-decoration:none; background:#eef2f5; padding:2px 6px; border-radius:4px; color:#2c3e50; display:inline-block; margin-top:3px; border:1px solid #dcdde1; }
.geo-link:hover { background:#dcdde1; }
.badge-manual { background:#e67e22; color:white; padding:2px 5px; border-radius:3px; font-size:10px; font-weight:bold; }
