/* =========================
   GLOBAL RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* =========================
   BODY / HINTERGRUND
========================= */
body {
    height: 100vh;
    overflow: hidden;
    /* Scrollen nur innerhalb der Boxen */
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #f1f1f1;
}

/* =========================
   HEADER (3 SPALTEN)
========================= */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    align-items: center;
    padding: 0 40px;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid #444;
    backdrop-filter: blur(6px);
    z-index: 1000;
}

/* Linke Spalte */
.header-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 90px;
}

/* Mittlere Navigation */
.header-center {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.header-center a {
    text-decoration: none;
    color: #cccccc;
    font-weight: 600;
    transition: 0.3s;
}

.header-center a:hover {
    color: #019c7c;
}

/* Rechte Spalte */
.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.username {
    color: #019c7c;
    font-weight: bold;
}

.logout-btn {
    text-decoration: none;
    padding: 8px 15px;
    background-color: #ff4d4d;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.logout-btn:hover {
    background-color: #cc0000;
}

/* =========================
   GLOBAL HOME LINK
========================= */
.global-home-link {
    position: absolute;
    top: 20px;
    left: 20px;
}

.global-home-link a {
    text-decoration: none;
    color: #00ccff;
    font-weight: bold;
}

/* =========================
   LOGIN BOX
========================= */
.login-box {
    background: rgba(30, 30, 30, 0.92);
    padding: 40px 50px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    width: 550px;
    max-width: 900px;
    text-align: left;
}

/* =========================
   STANDARD CONTENT/SETTINGS BOX
========================= */
.content-box,
.settings-box {
    background: rgba(30, 30, 30, 0.92);
    padding: 40px 50px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    width: 90vw;
    height: 85vh;
    overflow-y: auto;
    overflow-x: auto;
    margin-top: 80px;
    /* Platz unter Header */
    text-align: left;
}

/* Scrollbar Styling */
.content-box::-webkit-scrollbar,
.settings-box::-webkit-scrollbar,
.login-box::-webkit-scrollbar {
    width: 8px;
}

.content-box::-webkit-scrollbar-thumb,
.settings-box::-webkit-scrollbar-thumb,
.login-box::-webkit-scrollbar-thumb {
    background-color: #019c7c;
    border-radius: 4px;
}

/* =========================
   HEADINGS
========================= */
h1 {
    margin-bottom: 10px;
    font-size: 28px;
    color: #019c7c;
}

h1::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;   /* statt 4px */
    margin-top: 12px;
    background: #444;
}

h2 {
    margin-bottom: 25px;
    font-size: 20px;
    color: #019c7c;
}

/* =========================
   FORM GRID (NEBENEINANDER)
========================= */
.form-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

/* =========================
   LABELS
========================= */
.form-field label,
.login-form label {
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: bold;
    color: #ffffff;
}

/* =========================
   INPUTS & TEXTAREAS
========================= */
.form-field input,
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(40, 40, 40, 0.7);
    color: #f1f1f1;
    font-size: 16px;
    font-family: 'Segoe UI', Arial, sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.form-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-field input:focus {
    border-color: #019c7c;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
    background: rgba(30, 30, 30, 0.9);
}

textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(40, 40, 40, 0.7);
    color: #f1f1f1;
    font-size: 16px;
    font-family: 'Segoe UI', Arial, sans-serif;
    outline: none;
    transition: all 0.3s ease;
}


input:focus,
textarea:focus {
    border-color: #019c7c;
    box-shadow: 0 0 6px #019c7c;
}

/* =========================
   BUTTONS
========================= */
button,
.btn,
.btn-login2 {
    padding: 12px 25px;
    background-color: #019c7c;
    border: none;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 150px;
    /* Einheitliche Breite */
}

button:hover,
.btn:hover,
.btn-login2:hover {
    background-color: #019c7c;
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.8);
}
.btn-reset {
    background-color: #bbbbbb; /* neue Hintergrundfarbe */
    color: #000000; /* Schriftfarbe */
}

.btn-delete {
    width: 30px;
    height: 30px;
    padding: 0;
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}

.btn-delete:hover {
    background-color: #cc0000;
}

.btn-reset:hover {
    background-color: #FF3333; /* Hover-Farbe */
    color: #ffffff;/* Schriftfarbe */
}
/* =========================
   FORM ACTIONS (BUTTONS ZENTRIERT)
========================= */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* =========================
   ERROR MESSAGE
========================= */
.error {
    color: #ff4d4d;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

/* =========================
   TABLE STYLING
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #3a3a3a;
    margin-top: 20px;
    font-size: 14px;
    color: #f1f1f1;
}

table th,
table td {
    padding: 10px 12px;
    border: 1px solid #555;
    text-align: left;
}

table th {
    background-color: #444;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #383838;
}

table tr:hover {
    background-color: #505050;
}

/* Spezieller Input mit 3 Zeichen Breite */
.input-3 {
    width: calc(0.6em * 3 + 20px) !important;
    /* !important überschreibt width:100% */
    max-width: 100%;
}

/* Spezieller Input mit 30 Zeichen Breite */
.input-30 {
    width: calc(0.6em * 30 + 20px) !important;
    /* !important überschreibt width:100% */
    max-width: 100%;
}

/* Checkbox neben Label */
.checkbox-field {
    display: flex;
    align-items: left;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #019c7c;
    /* passend zu deinem Design */
}

.strikethrough {
    text-decoration: line-through;
    color: #888;
    /* optional: grau für bessere Sichtbarkeit */
}

input[readonly] {
    background-color: #eee;
    color: #888;
    /* Schrift grau */
    cursor: not-allowed;
}




.key-locked {
    background-color: #f2f2f2 !important;
    color: #777 !important;
    border: 1px solid #ddd !important;
    font-style: italic;
}

.danger-link {
    color: red;
    font-weight: bold;
}

/* rote Links für kritische Aktionen */
.header-center a.danger-link {
    color: red !important;
    /* das !important stellt sicher, dass andere a-Styles überschrieben werden */
    font-weight: bold;
}

.header-center a.danger-link:hover {
    color: darkred !important;
    text-decoration: underline;
}



.toolbar {
    display: flex;
    justify-content: flex-start;
    /* Buttons linksbündig */
    gap: 15px;
    margin: 20px 0;
    /* Abstand oben und unten */
    flex-wrap: wrap;
    /* Buttons umbrechen, falls Platz nicht reicht */
}

.btn {
    padding: 12px 25px;
    background-color: #019c7c;
    border: none;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    /* Breite nicht fixieren, flexibel */
    width: auto;
    white-space: nowrap;
    /* Buttontext in einer Zeile */
}


.letter-view { 
    white-space: pre-wrap; 
    border: 1px solid #019c7c; 
    padding: 15px; 
    border-radius: 8px; 
    background: #222; 
    color: #fff; 
}

.letter-subject {
    display: block;
    text-align: left;
    font-weight: bold;
    margin-bottom: 10px;

}

.letter-view h3 {
    margin-bottom: 15px;
    color: #019c7c;   
}

.letter-text {
    white-space: pre-wrap; /* Zeilenumbrüche behalten */
}


.encrypted {
  
    color: #019c7c;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* Inaktive Zeilen – Schrift hellrot */
tr.inactive td {
    color: #cc6666;
}

.empty-row td {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888 !important;   /* erzwingt gleiche Farbe */
}

.no-hint {
    color: #999;
    font-style: italic;
}

#gotoMessageBtn,
#otherEmailBtn {
    display: inline-block;
    width: 48%;           /* beide teilen sich die Breite */
    height: 45px;
    margin: 5px 1%;
    vertical-align: top;
}
.other-btn {
    background-color: #dc3545;
    color: #fff;
    transition: 0.3s ease;
}

.other-btn:hover {
    background-color: #c82333; /* dunkleres Rot beim Hover */
    color: #fff;
}

.btn-icon,
.btn-delete {
    text-decoration: none;   /* kein Unterstrich */
    border: none;            /* keine Rahmen bei Buttons */
    background: none;        /* Hintergrund entfernen */
    cursor: pointer;         /* Zeiger-Cursor */
    font-size: 1.2em;        /* Icon-Größe anpassen */
    padding: 0 4px;          /* Abstand zu anderen Elementen */
    color: inherit;          /* Farbe wie Text */
}

.btn-icon:hover,
.btn-delete:hover {
    opacity: 0.8;            /* leichter Hover-Effekt */
}
/* Alle Links ohne Unterstrich */
a {
    text-decoration: none;  /* entfernt Unterstreichung */
    color: inherit;         /* Links behalten die Textfarbe */
}

/* Optional: Hover-Effekt */
a:hover {
    text-decoration: none;  /* Unterstrich auch beim Hover verhindern */
    opacity: 0.8;           /* leichter Hover-Effekt */
}
/* =========================
   MESSAGE TYPE CARDS (angepasst)
========================= */

.message-type-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center; /* Zentriert die Karten */
    margin-top: 30px;
}

.card {
    width: 30%;             /* halb so breit wie vorher (zwei Karten pro Reihe) */
    min-width: 250px;       /* Mindestbreite für mobile */
    height: 300px;          /* doppelt so hoch wie vorher */
    background: #2a2a2a;
    border-radius: 10px;
    padding: 25px;
    transition: 0.3s ease;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Text oben, Hinweis unten */
}

/* =========================
   MESSAGE TYPE CARDS (Hover-Farben)
========================= */

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0,255,136,0.4); /* Standard für secure */
}

/* Verschlüsselte Karte */
.card.secure:hover {
    box-shadow: 0 0 15px rgba(0,255,136,0.4);
}

/* Unverschlüsselte Karte */
.card.unsecure:hover {
    box-shadow: 0 0 15px rgba(255,77,77,0.7); /* Neon-Rot */
}
.card h3 {
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 1.4em;
}

.card p {
    color: #cccccc;
    line-height: 1.6;
    flex-grow: 1; /* Text nimmt den Platz */
}

/* Secure */
.card.secure {
    border-left: 4px solid #019c7c;
}

/* Unsecure */
.card.unsecure {
    border-left: 4px solid #ff4d4d;
}

.card span {
    font-weight: bold;
    font-size: 0.95em;
}
/* -------------------------
Allgemeine Formularfelder
-------------------------- */
.input-modern,
.input-modern-dropdown,
textarea.input-modern {
 width: 100%;
 padding: 10px 12px;
 font-size: 1rem;
 font-family: Arial, sans-serif;
 border-radius: 8px;
 border: 1px solid #555;
 background-color: #2f2f2f;
 color: #fff;
 box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
 transition: all 0.2s ease-in-out;
 margin-top: 5px;
 margin-bottom: 15px;
 box-sizing: border-box;
}

.input-modern:focus,
textarea.input-modern:focus,
.input-modern-dropdown:focus,
#decryptModal input:focus {
    outline: none;
    border-color: #019c7c;
    background-color: #3a3a3a;
    box-shadow: 0 0 12px rgba(1, 156, 124, 0.7);
    transition: all 0.3s ease-in-out;
}

/* -------------------------
Dropdown spezifisch
-------------------------- */
.input-modern-dropdown {
 appearance: none;
 -webkit-appearance: none;
 -moz-appearance: none;
 position: relative;
 cursor: pointer;
}

/* Pfeil im Dropdown (weiß auf dunkel) */
.input-modern-dropdown::after {
 content: "▼";
 position: absolute;
 right: 15px;
 top: 50%;
 transform: translateY(-50%);
 pointer-events: none;
 color: #fff;
 font-size: 0.8rem;
}

/* -------------------------
Buttons
-------------------------- */
.btn-save {
 background-color: #019c7c;
 color: #fff;
 border: none;
 border-radius: 8px;
 padding: 12px 20px;
 font-weight: bold;
 cursor: pointer;
 transition: background-color 0.2s ease-in-out;
}

.btn-save:hover {
 background-color: #019c7c;
}

.btn-reset {
 background-color: #dc3545;
 color: #fff;
 border: none;
 border-radius: 8px;
 padding: 12px 20px;
 font-weight: bold;
 cursor: pointer;
 transition: background-color 0.2s ease-in-out;
}

.btn-reset:hover {
 background-color: #c82333;
}

/* -------------------------
Checkbox Feld
-------------------------- */
.checkbox-field {
 margin-bottom: 15px;
}

.checkbox-field input[type="checkbox"] {
 margin-left: 10px;
}

/* -------------------------
Form-Felder allgemein
-------------------------- */
.form-field {
 display: flex;
 flex-direction: column;
}

.form-field label {
 margin-bottom: 5px;
 color: #fff;
}

/* -------------------------
Modal Styles (falls genutzt)
-------------------------- */
.modal {
 display: none;
 position: fixed;
 top:0; left:0;
 width: 100%;
 height: 100%;
 background: rgba(0,0,0,0.5);
 z-index: 1000;
 justify-content: center;
 align-items: center;
}

.modal-content {
 background: #2f2f2f;
 padding: 20px;
 border-radius: 8px;
 width: 400px;
 max-width: 90%;
 text-align: center;
 color: #fff;
}

.modal-content button {
 margin: 10px;
 padding: 10px 15px;
 border: none;
 border-radius: 5px;
 cursor: pointer;
 font-weight: bold;
 color: #fff;
}

.goto-btn {
 background-color: #019c7c;
 color:#fff;
}

.overview-explanation_always {
    background-color: #3a3a3a;
    border: 1px solid #019c7c;
    padding: 20px 25px;
    border-radius: 8px;
    color: #cccccc;
    line-height: 1.6;
    margin-top: 15px;
}

.overview-explanation {
    display: none;
    background-color: #3a3a3a;
    border: 1px solid #019c7c;
    padding: 20px 25px;
    border-radius: 8px;
    color: #cccccc;
    line-height: 1.6;
    margin-top: 15px;
}

.overview-explanation.active {
    display: block;
}

/* Standard: geschlossen */
.overview-explanation.collapsed {
    display: none;
}

.btn-help {
    background-color: #00ff88;
    color: #000;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Dezentes Pulsieren beim Laden */
@keyframes helpGlow {
    0%   { box-shadow: 0 0 0px rgba(0,255,136,0.0); }
    50%  { box-shadow: 0 0 12px rgba(0,255,136,0.6); }
    100% { box-shadow: 0 0 0px rgba(0,255,136,0.0); }
}

.btn-help.attention {
    animation: helpGlow 2s ease-in-out 3;
}

@keyframes helpPulse {
    0% {
        box-shadow: 0 0 0px rgba(0,255,136,0.0);
    }
    50% {
        box-shadow: 0 0 14px rgba(0,255,136,0.7);
    }
    100% {
        box-shadow: 0 0 0px rgba(0,255,136,0.0);
    }
}

.btn-help.attention {
    animation: helpPulse 2.5s ease-in-out infinite;
}

.toolbar_help {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-content .other-btn {
    background-color: #dc3545 !important;
    color: #fff !important;
    transition: 0.3s ease;
}

.modal-content .other-btn:hover {
    background-color: #c82333 !important;
}

.form-row {
    display: flex;
    gap: 20px;          /* Abstand zwischen den Feldern */
    flex-wrap: wrap;    /* Zeilenumbruch auf kleinen Bildschirmen */
    margin-bottom: 15px;
}

.form-row .form-field {
    flex: 1;            /* Alle Felder gleich breit */
    min-width: 180px;   /* verhindert zu kleine Felder */
}

/* Roter Zurück-Button */
.btn-red {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5); /* roter Glow */
    transition: box-shadow 0.2s ease;
}

.btn-red:hover {
    background-color: #dc3545; /* bleibt rot */
    color: #fff;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.8); /* stärkerer roter Glow beim Hover */
}

/* Checkbox inline mit Label links ausgerichtet */
.form-field.checkbox-field {
    display: flex;
    align-items: flex-start; /* oben ausgerichtet */
    gap: 10px; /* Abstand zwischen Label und Checkbox */
}
#gotoMessageBtn {
    background-color: #dc3545 !important; /* Rot */
    color: #fff;
}

.btn-icon.disabled {
    filter: grayscale(100%);
    opacity: 0.5;
    cursor: not-allowed;
}
/* Checkbox Feld */
/* Checkbox inline rechts vom Text */
.form-field.checkbox-field {
    display: flex;
    flex-direction: row;    /* horizontal */
    align-items: center;    /* vertikal zentriert */
    gap: 10px;              /* Abstand zwischen Text und Checkbox */
}

/* Label */
.form-field.checkbox-field label {
    font-size: 16px;
    cursor: pointer;
    margin: 0;              /* kein Abstand */
}

/* Checkbox selbst */
.form-field.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #019c7c;  /* rot passend zum Button */
    margin: 0;
}

.form-row {
    display: flex;
    gap: 20px;               /* Abstand zwischen den Feldern */
    flex-wrap: nowrap;        /* keine Zeilenumbrüche */
    justify-content: flex-start; /* linksbündig */
    align-items: flex-start;  /* vertikal oben ausrichten */
    margin-bottom: 20px;
}

.form-row .form-field {
    flex: 0 0 30ch;          /* feste Breite passend zu deinem Input */
    display: flex;
    flex-direction: column;
}

.form-row .form-field div {
    position: relative;      /* für Augen-Icon innerhalb des Inputs */
}

.form-row .form-field input {
    width: 100%;             /* füllt die Container-Breite */
}
/* Banner */
.hero-banner{
    width:450px;
    max-width:100%;
    margin-bottom:25px;
    max-width:450px;
}

.login-box {
    position: relative; /* wichtig für absolute Positionierung */
}

/* Entferne absolute Positionierung */
.login-back-link {
    position: static; /* vorher: absolute */
    font-size: 18px;
    text-decoration: none;
    transition: 0.2s ease;
    color: #019c7c;
}

.login-link {
    color: #019c7c;       /* Schriftfarbe grün */
    text-decoration: none;
    font-size: 18px;
    transition: 0.2s ease;
}

.login-link:hover {
    color: #019c7c;
    text-decoration: none;
}

.login-back-link:hover {
    color: #019c7c;
}