/* ============================================================
   SeeMeGrow – Sky Blue Custom Theme
   Primary: #4A90A4  Dark: #2C6070  Light bg: #F0F8FC
   ============================================================ */

:root {
    --smg-primary:        #4A90A4;
    --smg-primary-dark:   #2C6070;
    --smg-primary-darker: #1A4A58;
    --smg-primary-light:  #B8D8E8;
    --smg-primary-bg:     #F0F8FC;
    --smg-text-muted:     #7AAAB8;
    --smg-max-width:      1100px;

    /* Dashboard-Widget-Defaults (Bento-Bereich auf der Home).
       Werden von Modifier-Klassen wie .smg-widget--coral / --sage / --purple /
       --amber zur Laufzeit überschrieben. Default = Sky-Blue. */
    --smg-widget-accent:  var(--smg-primary);
    --smg-widget-bg:      var(--smg-primary-bg);
    --smg-widget-text:    var(--smg-primary-darker);
    --smg-widget-border:  var(--smg-primary-light);
    --smg-widget-shadow:  rgba(74, 144, 164, 0.18);
}

/* ---- App-weite Breite ---- */
html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--smg-primary-bg);
}
a { color: var(--smg-primary); }
a:hover { color: var(--smg-primary-dark); }

/* Äußere App-Hülle: zentriert mit max-width */
.smg-app-shell {
    max-width: var(--smg-max-width);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--smg-primary-bg);
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    position: relative;
}

/* Bootstrap primary override */
.btn-primary {
    background-color: var(--smg-primary);
    border-color: var(--smg-primary);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--smg-primary-dark);
    border-color: var(--smg-primary-dark);
    color: #fff;
}
.btn-outline-primary {
    color: var(--smg-primary);
    border-color: var(--smg-primary);
}
.btn-outline-primary:hover {
    background-color: var(--smg-primary);
    border-color: var(--smg-primary);
    color: #fff;
}
.text-primary  { color: var(--smg-primary) !important; }
.bg-primary    { background-color: var(--smg-primary) !important; }
.border-primary { border-color: var(--smg-primary) !important; }

/* Focus ring */
.btn:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 164, 0.3);
}

/* ---- Navbar ---- */
.smg-navbar {
    background-color: var(--smg-primary);
    padding: 0.5rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.smg-navbar .navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    text-decoration: none;
    /* Platz für das schwebende Logo-Medaillon links */
    margin-left: 72px;
}
.smg-navbar .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem !important;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.smg-navbar .nav-link:hover,
.smg-navbar .nav-link.active {
    background-color: rgba(255,255,255,0.18);
    color: #fff !important;
}
.smg-navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.4);
}
.smg-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* ---- Schwebendes Logo-Medaillon ---- */
/* Sitzt absolut auf dem Übergang Navbar ↔ Seiteninhalt */
.smg-corner-logo {
    position: absolute;
    top: 8px;
    left: 18px;
    z-index: 300;
    width: 82px;
    height: 82px;
    background-color: #fff !important;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #fff;
}
.smg-corner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #fff;
    transform: scale(1.36);
}

.smg-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

/* ---- Page wrapper ---- */
.smg-page {
    background-color: var(--smg-primary-bg);
    min-height: calc(100vh - 54px);
    padding: 3.5rem 2rem 1.75rem 2rem;
    position: relative;
    overflow: hidden;
}
/* Wasserzeichen: mittig, groß */
.smg-page::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1200px;
    height: 1200px;
    background-image: url('/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}
.smg-page > * {
    position: relative;
    z-index: 1;
}

/* ---- Cards ---- */
.smg-card {
    background: #fff;
    border: 1px solid var(--smg-primary-light);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.smg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(74,144,164,0.15);
}
.smg-card-dashed {
    border: 2px dashed var(--smg-primary-light);
    border-radius: 10px;
    background: rgba(240,248,252,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s;
    min-height: 110px;
}
.smg-card-dashed:hover {
    border-color: var(--smg-primary);
}
.smg-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #DCF0F8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ---- Auth pages ---- */
.smg-auth-wrapper {
    min-height: 100vh;
    background: var(--smg-primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.smg-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(74,144,164,0.12);
}

/* ============================================================
   Dashboard – Bento-Widgets (Home.razor)
   Akzent-Variablen werden global in :root deklariert, pro Widget
   per Modifier-Klasse (.smg-widget--coral usw.) überschrieben.
   ============================================================ */
.smg-widget {
    background: #fff;
    border: 1px solid var(--smg-widget-border);
    border-top: 4px solid var(--smg-widget-accent);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.smg-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px var(--smg-widget-shadow);
}
.smg-widget-header {
    background: var(--smg-widget-bg);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--smg-widget-text);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-bottom: 1px solid var(--smg-widget-border);
    transition: background 0.15s;
}
.smg-widget-header:hover { filter: brightness(0.97); }
.smg-widget-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.smg-widget-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.smg-widget-count {
    background: var(--smg-widget-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    line-height: 1.5;
    min-width: 22px;
    text-align: center;
}
.smg-widget-link {
    font-size: 0.74rem;
    color: var(--smg-widget-accent);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.smg-widget-action {
    background: var(--smg-widget-accent);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.1s, filter 0.1s;
    padding: 0;
}
.smg-widget-action:hover { transform: scale(1.08); filter: brightness(1.08); }
.smg-widget-action:active { transform: scale(0.95); }
.smg-widget-body {
    padding: 12px 16px;
    flex: 1;
    overflow: hidden;
}
.smg-widget-time {
    min-width: 110px;
    font-weight: 700;
    color: var(--smg-widget-accent);
    font-size: 0.85rem;
}

/* Akzent-Varianten */
.smg-widget--coral {
    --smg-widget-accent: #E27D6C;
    --smg-widget-bg: #FDF2EE;
    --smg-widget-text: #8C3D2E;
    --smg-widget-border: #F4D4CB;
    --smg-widget-shadow: rgba(226, 125, 108, 0.20);
}
.smg-widget--sage {
    --smg-widget-accent: #6A9A6B;
    --smg-widget-bg: #EFF5EE;
    --smg-widget-text: #2F5A30;
    --smg-widget-border: #C8DBC7;
    --smg-widget-shadow: rgba(106, 154, 107, 0.20);
}
.smg-widget--purple {
    --smg-widget-accent: #8B7CB5;
    --smg-widget-bg: #F3F0F9;
    --smg-widget-text: #4A3D74;
    --smg-widget-border: #D4CCE3;
    --smg-widget-shadow: rgba(139, 124, 181, 0.20);
}
.smg-widget--amber {
    --smg-widget-accent: #D9A555;
    --smg-widget-bg: #FBF4E5;
    --smg-widget-text: #6F4E11;
    --smg-widget-border: #ECDAB2;
    --smg-widget-shadow: rgba(217, 165, 85, 0.20);
}

/* ---- Misc ---- */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 6px;
}
.blazor-error-boundary::after { content: "Ein Fehler ist aufgetreten."; }
