
/* ==========================================================================
   Basis-Layout & Globale App-Stile (Der Rahmen für das Dashboard)
   ========================================================================== */

/* Haupt-Container der App */
.counter-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: #f7fafc;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Die obere Leiste (Titel + Darkmode-Button) */
.app-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 25px;
    position: relative;
}

/* Hauptüberschrift */
.app-title {
    margin: 0;
    font-size: 1.75rem;
    color: #1a202c;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Der runde Nachtmodus-Button oben rechts */
.btn-dark-mode {
    background: #e2e8f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-size: 1.1rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-dark-mode:hover {
    background: #cbd5e0;
    color: #1a202c;
}

/* ==========================================================================
   BASIS DARK MODE (Für den äußeren Rahmen)
   ========================================================================== */
.counter-app.dark-mode {
    background: #1a202c;
    color: #f7fafc;
}

.counter-app.dark-mode .app-top-bar {
    border-bottom-color: #2d3748;
}

.counter-app.dark-mode .app-title {
    color: #ffffff;
}

.counter-app.dark-mode .btn-dark-mode {
    background: #2d3748;
    color: #f7fafc;
}

.counter-app.dark-mode .btn-dark-mode:hover {
    background: #4a5568;
    color: #ffffff;
}

/* ==========================================================================
   CraSy Tool-Dashboard Styles
   ========================================================================== */

/* Header & Untertitel */
.dashboard-header {
    text-align: left;
    margin-bottom: 25px;
    padding-right: 40px;
}

.app-subtitle {
    font-size: 0.95rem;
    color: #4a5568;
    margin-top: 8px;
    line-height: 1.6;
}

/* Das Grid-System (Layout) */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

/* Link-Kapselung zurücksetzen */
.tool-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Die einzelnen Tool-Kacheln */
.tool-dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover-Effekt: Kacheln heben sich edel an */
.tool-card-link:hover .tool-dashboard-card {
    transform: translateY(-3px);
    border-color: #3182ce;
    box-shadow: 0 10px 15px -3px rgba(49, 130, 206, 0.1), 0 4px 6px -2px rgba(49, 130, 206, 0.05);
}

/* Container für das Icon/Bild links */
.tool-icon-container {
    width: 75px;
    height: 75px;
    min-width: 75px;
    background: #ebf8ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

/* Bildbegrenzung im Icon-Container (Verhindert das Zerschießen) */
.dashboard-tool-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Inhalt der Kachel (Textbereich) */
.tool-card-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.tool-card-content h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #2d3748;
    font-weight: 700;
}

.tool-card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.5;
}

/* Der Aktions-Link ("Jetzt zählen ➔") */
.btn-tool-go {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: bold;
    color: #3182ce;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.tool-card-link:hover .btn-tool-go {
    color: #2b6cb0;
}

/* ==========================================================================
   INTEGRIERTER NACHTMODUS (DARK MODE)
   ========================================================================== */
.counter-app.dark-mode .app-subtitle {
    color: #cbd5e0;
}

.counter-app.dark-mode .tool-dashboard-card {
    background: #2d3748;
    border-color: #4a5568;
}

.counter-app.dark-mode .tool-icon-container {
    background: #2b6cb0;
}

.counter-app.dark-mode .tool-card-content h3 {
    color: #ffffff;
}

.counter-app.dark-mode .tool-card-content p {
    color: #a0aec0;
}

.counter-app.dark-mode .btn-tool-go {
    color: #63b3ed;
}

.counter-app.dark-mode .tool-card-link:hover .tool-dashboard-card {
    border-color: #63b3ed;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Ab Tablet / Desktop zweispaltig)
   ========================================================================== */
@media (min-width: 640px) {
    .tools-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .tool-dashboard-card {
        height: 100%; /* Macht alle Kacheln in einer Zeile perfekt gleich hoch */
        box-sizing: border-box;
    }
}
/* Dashboard-spezifische Header-Styles */
.dashboard-header {
    text-align: left;
    margin-bottom: 20px;
    padding-right: 40px;
}
.app-subtitle {
    font-size: 0.95rem;
    color: #4a5568;
    margin-top: 5px;
    line-height: 1.5;
}
.counter-app.dark-mode .app-subtitle {
    color: #cbd5e0;
}

/* Das Grid-System */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

/* Link-Kapselung zurücksetzen */
.tool-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Die einzelnen Tool-Kacheln */
.tool-dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Hover-Effekt: Die Kacheln reagieren edel auf den Mauszeiger */
.tool-card-link:hover .tool-dashboard-card {
    transform: translateY(-3px);
    border-color: #3182ce;
    box-shadow: 0 10px 15px -3px rgba(49, 130, 206, 0.1), 0 4px 6px -2px rgba(49, 130, 206, 0.05);
}

/* Container für das Icon/Bild links */
.tool-icon-container {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: #ebf8ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}
.counter-app.dark-mode .tool-icon-container {
    background: #2b6cb0;
}

/* Bildbegrenzung im Icon-Container */
.dashboard-tool-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Inhalt der Kachel */
.tool-card-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.tool-card-content h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #2d3748;
}
.counter-app.dark-mode .tool-card-content h3 {
    color: #fff;
}
.tool-card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.4;
}
.counter-app.dark-mode .tool-card-content p {
    color: #a0aec0;
}

/* Der Aktions-Link unten rechts an der Kachel */
.btn-tool-go {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: bold;
    color: #3182ce;
    margin-top: 4px;
    transition: color 0.2s ease;
}
.tool-card-link:hover .btn-tool-go {
    color: #2b6cb0;
}
.counter-app.dark-mode .btn-tool-go {
    color: #63b3ed;
}

/* Dark Mode für die Kacheln selbst */
.counter-app.dark-mode .tool-dashboard-card {
    background: #2d3748;
    border-color: #4a5568;
}
.counter-app.dark-mode .tool-card-link:hover .tool-dashboard-card {
    border-color: #63b3ed;
}

/* Responsive Anpassung: Ab Tablets nebeneinander (Zweispaltig) */
@media (min-width: 640px) {
    .tools-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .tool-dashboard-card {
        height: 100%; /* Macht alle Kacheln in einer Zeile gleich hoch */
        box-sizing: border-box;
    }
}