
/* ============================================================
   BASIS-CSS für das SaaS-Framework
   ------------------------------------------------------------
   Enthält Layout, Typografie, Formulare, Tabellen, Buttons,
   sowie Utility-Klassen zur Wiederverwendung im gesamten System.
   ============================================================ */

/* ---------------------------
   1. Schriftart einbinden
---------------------------- */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Light.ttf') format('truetype');
    font-weight: 100;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Bold.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Regular.ttf') format('truetype');
    font-weight: 200;
}


body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 200;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 0px;
}

main {
    padding: 20px;
}

/* ---------------------------
   Überschriften
---------------------------- */
h1, h2, h3 {
    color: #222;
    font-weight: 200;
    margin-top: 10px;
}

/* ---------------------------
   Header
---------------------------- */
.page-header {
    background-color: #222;
    padding: 0px 20px;
}

.header-container {
    display: flex;
    justify-content: right;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}
.header-right {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    padding-right: 15px;
}

.site-title {
    font-size: 28px;
    font-weight: 400;
    margin: 0;
    color: #f8f9fa;
    text-decoration: none;
}

.header-right p, .header-left p {
    font-size: 14px;
    font-weight: 100;
    color: #f8f9fa;
    margin-top: 7px;
    margin-bottom: 7px;
}

.header-right a {
    font-size: 14px;
    font-weight: 100;
    margin-left: 10px;
    text-decoration: none;
    color: #f08228;
}

.header-right a:hover {
    cursor: pointer;
}

.login-logout-toggle {
    padding-top: 4px;
}

/* Mobil: Toggle sichtbar, Menü ein-/ausklappbar */
@media (max-width: 768px) {
    .site-title {
        font-size: 24px;
    }

}



/* ---------------------------
   Footer
---------------------------- */
footer  {
    text-align:center;
    font-size:0.8em; 
    padding:10px;
}

/* ---------------------------
   Tabellen
---------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    margin-bottom: 20px;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
}

th {
    background-color: #f1f1f1;
    text-align: left;
}

/* ---------------------------
   Formulare
---------------------------- */
form {
    margin-bottom: 20px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"],
button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

input[type="submit"]:hover,
button:hover {
    background-color: #0056b3;
}

/* ---------------------------
   Buttons - Zusätzliche Klassen
---------------------------- */
.button-danger {
    padding: 10px 20px;
    border: none;
    background-color: #dc3545;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.button-danger:hover {
    background-color: #c82333;
}

.button-secondary {
    background-color: #6c757d;
}

.button-secondary:hover {
    background-color: #5a6268;
}

/* ---------------------------
   Utility-Klassen
---------------------------- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.muted {
    color: #888;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ---------------------------
   Modal-Stil (für ModalHelper)
---------------------------- */
/* Modal-Grundlayout */

body.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

.modal-box {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 480px;
    width: 90%;
    animation: fadeIn 0.3s ease-out;
}

/* Headline */
.modal-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* Text */
.modal-box p {
    font-size: 1.1em;
    margin: 0 0 20px;
}

/* Buttons */
.modal-box form {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-box button {
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-danger {
    background-color: #c0392b;
    color: white;
}

.btn-danger:hover {
    background-color: #a83225;
}

.btn-secondary {
    background-color: #bdc3c7;
    color: #333;
}

.btn-secondary:hover {
    background-color: #a5a9ad;
}

/* Einfache Fade-In-Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------
   Navigations-Stil 
---------------------------- */

.main-nav {
    background: #444;
    color: #f8f9fa;
    padding: 5px 20px;
    position: relative;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

.nav-container button {
    padding: 0;
}

.nav-container button:hover {
    background: none;
    transform: rotate(30deg);
}

.nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 33px;
    right: 0px;
    background: white;
    border: 1px solid #ddd;
    border-bottom-right-radius: 6px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 150px;
    padding: 5px 0;
}

.nav-links li {
    display: block;
    width: 100%;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

.nav-links a:hover {
    background-color: #f0f0f0;
}

.nav-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle img.nav-logo {
    height: 24px;
    width: 24px;
}

.nav-links.show {
    display: flex;
}

.desktop {
    display: block;
}

.mobile {
    display: none;
}

/* Mobil: Toggle sichtbar, Menü ein-/ausklappbar */
@media (max-width: 768px) {
    .desktop {
        display: none;
    }

    .mobile {
        display: block;
    }
}
/* ---------------------------
   Login-Stil 
---------------------------- */

/* Verstecke Header + Navigation, wenn .no-header auf <body> gesetzt ist */
body.no-header .page-header,
body.no-header .menu,
body.no-header nav {
    display: none;
}

body.no-header main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

/* Loginbereich */
.login {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    color: #333;
}

.login label {
    font-weight: 500;
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    color: #444;
}

.login input[type="text"],
.login input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.login input[type="submit"] {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.login input[type="submit"]:hover {
    background-color: #34495e;
}

.service {
    text-align: center;
    line-height: 25px;
}

.service a {
    font-weight: 200;
    font-size: 0.8em;
    color: #000;
    text-decoration: none;
}

.service a:hover {
    color: #34495e;
}

/* Optional für kleine Geräte */
@media (max-width: 480px) {
    .login {
        margin: 20px;
        padding: 20px;
    }
}



/* ---------------------------
   Lic-Manager-Stil 
---------------------------- */


.license-valid {
    background-color: #e0ffe0; /* sanftes Grün */
}

.license-expired {
    background-color: #ffe0e0; /* sanftes Rot */
}

.license-table {
    border-collapse: collapse;
    width: 100%;
}

.license-table th, .license-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}


/* ---------------------------
   User-Manager-Stil 
---------------------------- */

.user-active {
    background-color: #ffffff; /* normal */
}

.user-inactive {
    background-color: #f0f0f0; /* leichtes Grau */
    color: #777777; /* etwas dunkleres Grau für Text */
}


/* ---------------------------
   Admin-Dashboard-Stil 
---------------------------- */

.system-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.system-table th, .system-table td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

.system-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.system-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.system-table tr:hover {
    background-color: #eef6ff;
}


/* ---------------------------
   System-Settings-Stil 
---------------------------- */

.tabs {
    margin-top: 20px;
}

.tab-labels {
    display: flex;
    border-bottom: 2px solid #ccc;
}

.tab-labels label {
    padding: 10px 20px;
    margin-right: 5px;
    background: #f5f5f5;
    cursor: pointer;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: bold;
}

.tab-labels label:hover {
    background: #e0e0e0;
}

.tab-content {
    display: none;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
    background: #fff;
}

input[type="radio"] {
    display: none;
}

#tab1:checked ~ .tabs .content1,
#tab2:checked ~ .tabs .content2,
#tab3:checked ~ .tabs .content3,
#tab4:checked ~ .tabs .content4 {
    display: block;
}

#tab1:checked ~ .tabs .tab-labels label[for="tab1"],
#tab2:checked ~ .tabs .tab-labels label[for="tab2"],
#tab3:checked ~ .tabs .tab-labels label[for="tab3"],
#tab4:checked ~ .tabs .tab-labels label[for="tab4"] {
    background: #fff;
    border-bottom: 2px solid white;
}


/* ---------------------------
Admin-Widgets-Stil 
---------------------------- */

.dashboard-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: flex-start;
}

.widget {
    flex: 0 0 calc(25% - 20px); /* 4 Kacheln pro Zeile, Abzug für den Gap */
    background: #0e9e5612;
    border: 1px solid #0E9E57;
    border-radius: 8px;
    text-align: center;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Optional: Etwas hübschere Darstellung auf kleineren Bildschirmen */
@media (max-width: 1200px) {
    .widget {
        flex: 0 0 calc(50% - 20px); /* 2 Kacheln pro Zeile */
    }
}

@media (max-width: 768px) {
    .widget {
        flex: 0 0 100%; /* 1 Kachel pro Zeile */
    }
}

.widget h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 22px;
    font-weight: 200;
    color: #fff;
    padding: 10px;
    background-color: #4da77a;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.widget p {
    color: #0E9E57;
    margin: 10px 0 0 0;
    font-weight: 200;
    font-size: 16px;
    padding: 5px;
}

.widget .title {
    position: relative;
    left: 1%;
}

.widget .title p {
    margin: 0;
    font-weight: 200;
    font-size: 16px;
}


.widget .circle {
    font-weight: 200;
    font-size: 50px;
    width: 80px;
    height: 80px;
    border: 1px solid #0E9E57;
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0E9E57;
    margin: 5px;
  }

  .widget .amount {
    color: #0E9E57;
    font-weight: 200;
    font-size: 24px;
}

.widget ul {

    color: #0E9E57;
    list-style: none; 
    text-align: center;  
}

.widget li {
    font-size: 16px;
    padding-bottom: 15px; 
}

.widget .container {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.widget .container .left {
    display: grid;
    align-items: center;
}
.widget .container .right {
    display: grid;
    align-items: center;
}

/* ---------------------------
Welcomebox-Stil 
---------------------------- */

.welcome-box {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f0f8ff;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
}


/* ---------------------------
Price-Panel-Stil 
---------------------------- */
.pricing-table {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.plan {
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 10px;
    width: 280px;
    text-align: center;
    padding: 20px;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.plan:hover {
    transform: translateY(-5px);
}

.plan.highlight {
    background: #f0f8ff;
    border: 2px solid #007bff;
}

.plan h2 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}

.plan .price {
    font-size: 28px;
    margin: 10px 0;
    color: #007bff;
}

.plan ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.plan ul li {
    margin: 10px 0;
}

.buy-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.buy-button:hover {
    background-color: #0056b3;
}

.badge {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffc107;
    color: #333;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
}
.plan {
    position: relative; /* Für Badge-Positionierung nötig */
}



/* ---------------------------------------
USER & SUPERUSER Dashboard-Stiel als Menu
--------------------------------------- */

.dashboard-layout {
    display: flex;
    min-height: 80vh;
}

.dashboard-sidebar {
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
}

.dashboard-sidebar h2 {
    font-size: 18px;
    margin-top: 0;
    color: #333;
}

.app-nav ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.app-nav ul li {
    margin-bottom: 10px;
}

.app-nav ul li a {
    display: block;
    padding: 10px;
    color: #444;
    background-color: #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.app-nav .inactive {color: #858585;}

.app-nav ul li a:hover {
    background-color: #444;
    color: #fff;
}

.dashboard-content {
    flex: 1;
    padding: 30px;
    box-sizing: border-box;
}


/* ---------------------------------------
USER & SUPERUSER Dashboard-Stiel als Kachel
--------------------------------------- */


.dashboard-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.tile {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 250px;
    padding-bottom: 20px;
    text-align: center;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.tile:hover {
    transform: translateY(-5px);
}

.tile-image {
    width: 100%;
    height: 256px;
    object-fit: cover;
    border-top-left-radius:  6px;
    border-top-right-radius: 6px;
}

.tile h3 {
    margin: 15px 0 10px 0;
    font-size: 20px;
    color: #333;
    padding-left: 5px;
    padding-right: 5px;
}

.tile p {
    font-size: 14px;
    color: #666;
    padding-left: 5px;
    padding-right: 5px;
}

.tile-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #0E9E57;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}

.tile-button:hover {
    background: #0A703E;
}


/* ---------------------------
   APP "Notes"-Stil 
---------------------------- */

.notes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.note-card {
    background: #fff8a6;
    border: 1px solid #e2d98d;
    border-radius: 8px;
    width: 220px;
    padding: 15px;
    position: relative;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    font-family: sans-serif;
    white-space: pre-wrap;
}

.note-card h3 {
    margin: 0 0 10px;
    font-size: 1.1em;
}

.note-actions {
    position: absolute;
    top: 8px;
    right: 10px;
}

.note-actions a {
    text-decoration: none;
    margin-left: 5px;
    font-size: 1.1em;
}

.note-content {
    font-size: 0.95em;
}