﻿/* ===================================================================
   YoApp Modern UI — FINAL (Stable, Gentelella-compatible)
   -------------------------------------------------------------------
   Scope:
   • Pure visual polish: cards, tables, forms, buttons, typography
   • Keeps ALL Gentelella navigation behavior (no sidebar/menu overrides)
   • Safe for production: no layout shifts, no transforms on .left_col
   • Optional dark mode (content only) via body[data-theme="dark"]
   ------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

html, body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f6f7fb;
    font-size: 14px !important;
}

/* Layout breathing room for main content */
.container, .right_col {
    padding-top: 16px;
    padding-bottom: 24px;
}

/* -------------------------------
   Cards / Panels (x_panel family)
---------------------------------- */
.x_panel {
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    transition: box-shadow .22s ease, transform .14s ease;
}

    .x_panel:hover {
        box-shadow: 0 10px 26px rgba(0,0,0,0.12);
    }

.x_title {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 14px;
    padding: 12px 8px 10px;
    border-radius: 12px 12px 0 0; /* stable rounding */
}

    .x_title h2 {
        font-weight: 600;
        font-size: 1.15rem !important;
        margin: 0;
    }

.x_content {
    padding: 14px 10px;
}

/* -------------------------------
   Buttons
---------------------------------- */
.btn {
    border-radius: 8px !important;
    padding: .525rem 1rem;
    border-width: 0 !important;
}

.btn:active {
    transform: translateY(1px);
}

/* Truly small buttons */
.btn-xs {
    padding: 1px 6px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
}

  
/* Visible neutral default buttons (e.g., DataTables Copy/CSV/Print) */
.btn-default {
    background: #f0f2f5 !important;
    color: #111 !important;
    border: 1px solid #d7d9dc !important;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn-default:hover, .btn-default:focus {
    background: #e6e8eb !important;
    border-color: #c4c6c9 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* -------------------------------
   Forms
---------------------------------- */
.form-control {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: none !important;
    height: 36px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .form-control:focus {
        border-color: rgba(0,0,0,0.35);
        box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
    }

.input-group .input-group-addon {
    border-radius: 8px 0 0 8px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fafafa;
}

label {
    font-weight: 500;
    color: #2a2a2a;
    font-size: 13px;
}

/* -------------------------------
   Tables
---------------------------------- */
.table {
    background: #fff;
    border-radius: 10px;
}

    .table > thead > tr > th {
        background: #eef0f3 !important;
        font-size: .95rem;
        font-weight: 600;
        color: #1a1a1a !important;
        border-bottom: 2px solid rgba(0,0,0,0.08) !important;
        vertical-align: middle !important;
    }

    .table > tbody > tr > td {
        font-size: .92rem;
        padding: 10px 14px !important;
        color: #222;
    }

    .table > tbody > tr:hover > td {
        background-color: #f7f9fc !important;
    }

/* DataTables input aesthetics */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 6px !important;
}

/* -------------------------------
   Dashboard Widgets / KPI Tiles
---------------------------------- */
:root {
    --yoapp-accent: #24d6c9;
}

/* Stable rounding against theme overrides */
body.nav-md .row.top_tiles .tile-stats,
body.nav-sm .row.top_tiles .tile-stats {
    border-radius: 14px !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10) !important;
    overflow: hidden !important;
}

.row.top_tiles .tile-stats {
    transition: transform .18s ease, box-shadow .25s ease;
}

    .row.top_tiles .tile-stats:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 26px rgba(0,0,0,0.12) !important;
    }

    /* Teal icon badge */
    .row.top_tiles .tile-stats .icon {
        top: 18px;
        right: 18px;
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        background: color-mix(in srgb, var(--yoapp-accent) 15%, transparent);
        transition: background .18s ease, opacity .18s ease;
    }

        .row.top_tiles .tile-stats .icon i {
            font-size: 24px !important;
            color: var(--yoapp-accent);
            opacity: .65;
        }

    .row.top_tiles .tile-stats:hover .icon {
        background: color-mix(in srgb, var(--yoapp-accent) 25%, transparent);
    }

        .row.top_tiles .tile-stats:hover .icon i {
            opacity: .9;
        }

/* Preserve dotted "Add" tiles */
.addAccountBox .tile-stats {
    border: 2px dashed #8a8c91 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 12px !important;
}

    .addAccountBox:hover .tile-stats, .addAccountBox .tile-stats:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .addAccountBox .icon i {
        opacity: .55 !important;
        color: inherit !important;
    }

/* -------------------------------
   Top nav polish (visual only)
---------------------------------- */
.nav_menu {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 0 !important;
}

    .nav_menu .navbar-right li > a {
        height: 48px;
        display: flex;
        align-items: center;
        line-height: 48px !important;
    }

/* -------------------------------
   Optional Dark Mode (content only)
---------------------------------- */
body[data-theme="dark"] {
    color: #e6e6e6;
    background: #0f1115;
}

    body[data-theme="dark"] .right_col,
    body[data-theme="dark"] .container,
    body[data-theme="dark"] .page-title {
        background: transparent;
    }

    body[data-theme="dark"] .x_panel,
    body[data-theme="dark"] .table,
    body[data-theme="dark"] .tile-stats {
        background: #141821 !important;
        border: 1px solid rgba(255,255,255,0.10) !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
    }

    body[data-theme="dark"] .x_title {
        border-bottom-color: rgba(255,255,255,0.06);
    }

    body[data-theme="dark"] .table > thead > tr > th {
        background: #1a1f2b !important;
        border-bottom-color: rgba(255,255,255,0.06) !important;
    }

    body[data-theme="dark"] .table > tbody > tr:hover {
        background: #171c26 !important;
    }

    body[data-theme="dark"] .form-control,
    body[data-theme="dark"] .input-group .input-group-addon {
        background: #10141c;
        color: #e6e6e6;
        border-color: rgba(255,255,255,0.14) !important;
    }

    body[data-theme="dark"] .btn-default {
        background: #1f2532 !important;
        color: #fff !important;
    }

    body[data-theme="dark"] .tile-stats .icon {
        background: color-mix(in srgb, var(--yoapp-accent) 20%, transparent);
    }

        body[data-theme="dark"] .tile-stats .icon i {
            color: var(--yoapp-accent);
            opacity: .9;
        }

/* -------------------------------
   Safety: ensure Gentelella can't revert rounding
---------------------------------- */
body .tile-stats,
body .dashboard-widget-content,
body .dashboard-widget,
body .x_panel {
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07) !important;
    overflow: hidden; /* ensures inner content doesn't show sharp corners */
}

body .dashboard-widget-content .x_title,
body .x_panel .x_title {
    border-radius: 12px 12px 0 0 !important;
}
/* === Badge Styling: Soft Glow Pulse + Better Offset === */
.x_panel > .badge.pull-right.svcount {
    position: absolute;
    top: 15px; /* lowered slightly */
    right: 15px; /* moved inward */
    z-index: 12 !important;
    border-radius: 50% !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    line-height: 1;
    background: #12c48b !important; /* richer green */
    box-shadow: 0 0 0 2px #ffffff; /* white outline = better contrast */
    /* Glow + Bounce on arrival */
    animation: yo-bounce-in2 0.55s ease-out, yo-glow 2.6s infinite ease-in-out;
}

/* Prevent clipping inside rounded container */
.sections .x_panel {
    position: relative !important;
    overflow: visible !important;
}

/* Softer Glow Pulse */
@keyframes yo-glow {
    0%, 100% {
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 rgba(18,196,139,0.0);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 2px #ffffff, 0 0 12px rgba(18,196,139,0.45);
        transform: scale(1.08);
    }
}

/* New smoother bounce-in */
@keyframes yo-bounce-in2 {
    0% {
        transform: scale(0.3) translate(4px, -6px);
        opacity: 0;
    }

    60% {
        transform: scale(1.18) translate(0,0);
        opacity: 1;
    }

    100% {
        transform: scale(1) translate(0,0);
    }
}

/* Hover interaction */
.x_panel > .badge.pull-right.svcount:hover {
    animation-play-state: paused;
    box-shadow: 0 0 0 2px #ffffff, 0 0 14px rgba(18,196,139,0.55);
    transform: scale(1.15);
    cursor: default;
}
