/* =============================================================================
   Sentech Portal — Modern Kurumsal Stylesheet
   ========================================================================== */

:root {
    /* Marka renkleri */
    --primary:          #2563EB;   /* royal blue */
    --primary-hover:    #1D4ED8;
    --primary-active:   #1E40AF;
    --accent:           #0891B2;   /* cyan */
    --accent-light:     #06B6D4;

    /* Arkaplanlar */
    --bg:               #F8FAFC;   /* slate-50 */
    --bg-soft:          #F1F5F9;   /* slate-100 */
    --surface:          #FFFFFF;
    --surface-hover:    #F8FAFC;

    /* Sidebar (koyu) */
    --sidebar-bg:       #0F172A;   /* slate-900 */
    --sidebar-bg-2:     #1E293B;   /* slate-800 */
    --sidebar-text:     #CBD5E1;   /* slate-300 */
    --sidebar-text-mut: #64748B;   /* slate-500 */
    --sidebar-active:   #2563EB;
    --sidebar-border:   #1E293B;
    --sidebar-divider:  rgba(148, 163, 184, .08);

    /* Metin */
    --text:             #0F172A;
    --text-muted:       #64748B;
    --text-soft:        #94A3B8;

    /* Çerçeve / kenarlık */
    --border:           #E2E8F0;
    --border-strong:    #CBD5E1;

    /* Durum */
    --danger:           #DC2626;
    --danger-bg:        #FEF2F2;
    --danger-border:    #FECACA;
    --success:          #16A34A;
    --success-bg:       #F0FDF4;
    --success-border:   #BBF7D0;
    --warning:          #D97706;
    --warning-bg:       #FFFBEB;
    --warning-border:   #FDE68A;
    --info:             #0284C7;
    --info-bg:          #EFF6FF;
    --info-border:      #BFDBFE;

    /* Geometri */
    --radius-sm:        6px;
    --radius:           10px;
    --radius-lg:        14px;
    --shadow-xs:        0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm:        0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md:        0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
    --shadow-lg:        0 12px 32px rgba(15, 23, 42, .12), 0 4px 8px rgba(15, 23, 42, .06);
    --shadow-focus:     0 0 0 3px rgba(37, 99, 235, .18);

    /* Layout */
    --header-h:         64px;
    --sidebar-w:        260px;

    /* Tipografi */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.25; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p  { margin: 0 0 12px; }

/* =============================================================================
   AUTH (login / forgot / reset)
   ========================================================================== */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at top right, rgba(37, 99, 235, .25) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(8, 145, 178, .15) 0%, transparent 60%),
        linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
    border: 1px solid var(--border);
}
.auth-card .logo { text-align: center; margin-bottom: 28px; }
.auth-card .logo img { max-height: 56px; }
.auth-card .logo .company-name {
    margin-top: 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
}
.auth-card h1 {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 22px;
}

/* =============================================================================
   FORM
   ========================================================================== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control::placeholder { color: var(--text-soft); }
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}
.form-control[disabled],
.form-control:disabled {
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: not-allowed;
}
textarea.form-control { min-height: 96px; resize: vertical; line-height: 1.5; }
select.form-control { cursor: pointer; padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
}

/* =============================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    line-height: 1.2;
    white-space: nowrap;
    user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:active { background: var(--primary-active); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--border-strong); color: var(--text); }

.btn-danger {
    background: var(--surface);
    color: var(--danger);
    border-color: var(--danger-border);
}
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: var(--radius-sm); }

/* =============================================================================
   ALERTS
   ========================================================================== */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert::before { font-size: 16px; line-height: 1; flex-shrink: 0; }
.alert-error   { background: var(--danger-bg);  color: #991B1B; border-color: var(--danger-border); }
.alert-error::before { content: "⚠"; }
.alert-success { background: var(--success-bg); color: #166534; border-color: var(--success-border); }
.alert-success::before { content: "✓"; }
.alert-info    { background: var(--info-bg);    color: #1E40AF; border-color: var(--info-border); }
.alert-info::before { content: "ℹ"; }
.alert-warning { background: var(--warning-bg); color: #92400E; border-color: var(--warning-border); }
.alert-warning::before { content: "!"; }

/* =============================================================================
   APP LAYOUT
   ========================================================================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-xs);
}
.app-header .brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 600; color: var(--text);
    font-size: 15px;
    letter-spacing: -.01em;
}
.app-header .brand img { max-height: 36px; display: block; }
.app-header .menu-toggle {
    margin-right: 14px;
    background: none; border: none;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; cursor: pointer;
    color: var(--text-muted); border-radius: var(--radius);
    transition: background .15s;
}
.app-header .menu-toggle:hover { background: var(--bg-soft); color: var(--text); }
.app-header .user-info {
    margin-left: auto;
    display: flex; align-items: center; gap: 14px;
    font-size: 13px;
}
.app-header .user-info a { color: var(--text-muted); }
.app-header .user-info a:hover { color: var(--text); text-decoration: none; }
.app-header .user-name { color: var(--text); font-weight: 500; }

/* =============================================================================
   SIDEBAR (koyu, kurumsal)
   ========================================================================== */
.app-body { flex: 1; display: flex; min-height: 0; }
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    padding: 16px 0 24px;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h));
    position: sticky;
    top: var(--header-h);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .15); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .3); }

.sidebar .nav-section {
    padding: 18px 24px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sidebar-text-mut);
    letter-spacing: .8px;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 24px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
}
.sidebar .nav-link:hover {
    background: rgba(148, 163, 184, .06);
    color: #fff;
    text-decoration: none;
}
.sidebar .nav-link.active {
    background: rgba(37, 99, 235, .14);
    border-left-color: var(--sidebar-active);
    color: #fff;
    font-weight: 500;
}

/* =============================================================================
   MAIN CONTENT
   ========================================================================== */
.main {
    flex: 1;
    padding: 28px 32px;
    overflow-x: hidden;
    min-width: 0;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}
.page-header h1 { margin: 0; }

/* =============================================================================
   CARDS
   ========================================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 18px;
    overflow: hidden;
    transition: box-shadow .15s;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -.005em;
    color: var(--text);
    background: var(--surface);
}
.card-body { padding: 20px; }

/* =============================================================================
   STATS / KPI
   ========================================================================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.stat .label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.stat .value {
    font-size: 28px;
    font-weight: 600;
    margin-top: 6px;
    color: var(--text);
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

/* =============================================================================
   TABLE
   ========================================================================== */
.table-responsive { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    background: var(--bg-soft);
    font-weight: 600;
    font-size: 11.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.table tbody tr { transition: background .1s; }
.table tbody tr:hover td { background: var(--surface-hover); }
.table .actions { white-space: nowrap; text-align: right; }
.table tr:last-child td { border-bottom: none; }

/* =============================================================================
   TAGS
   ========================================================================== */
.tag {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}
.tag-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.tag-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.tag-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.tag-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }

/* =============================================================================
   NOTIFICATIONS LIST
   ========================================================================== */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 14px;
    align-items: center;
    transition: background .1s;
}
.notif-list li:last-child { border-bottom: none; }
.notif-list li:hover { background: var(--surface-hover); }
.notif-list li.unread {
    background: linear-gradient(to right, var(--info-bg) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
}
.notif-list .meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

/* =============================================================================
   ADMIN — Şube/Bölüm/Ekipman ağaç yönetimi
   ========================================================================== */
.tree, .tree-children { list-style: none; margin: 0; padding: 0; }
.tree-children {
    margin-left: 12px;
    padding-left: 20px;
    border-left: 2px dashed var(--border);
}
.tree-node { margin: 6px 0; }
.tree-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid transparent;
    transition: border-color .12s, background .12s;
    font-size: 14px;
}
.tree-row:hover { border-color: var(--border-strong); }
.tree-branch > .tree-row {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: #BFDBFE;
    font-weight: 500;
}
.tree-dept > .tree-row {
    background: var(--bg-soft);
    border-color: var(--border);
}
.tree-equipment > .tree-row {
    background: var(--surface);
    border-color: var(--border);
    font-size: 13.5px;
}
.tree-icon { font-size: 14px; line-height: 1; }
.tree-actions { margin-left: auto; }
.tree-add { margin: 8px 0; }
.tree-add .inline-add {
    display: flex; gap: 8px; align-items: center;
}
.tree-add .inline-add .form-control {
    flex: 1;
    max-width: 380px;
}

/* =============================================================================
   METRİK girişi (form) + analiz tablosu
   ========================================================================== */
.metric-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    background: var(--bg-soft);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.metric-row {
    display: grid;
    grid-template-columns: 240px 1fr 180px;
    gap: 10px;
    align-items: center;
}
.metric-label {
    font-weight: 500;
    font-size: 13.5px;
    color: var(--text);
}
@media (max-width: 768px) {
    .metric-row { grid-template-columns: 1fr; gap: 4px; }
    .metric-label { margin-top: 8px; }
}

.analysis-table th, .analysis-table td {
    font-size: 13px;
    padding: 10px 12px;
}
.analysis-table th { white-space: nowrap; }
.metric-cell {
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: -.01em;
    /* Ardışık aynı renkli hücrelerin birleşmemesi için beyaz dikey ayraç */
    box-shadow: inset -3px 0 0 #fff, inset 3px 0 0 #fff;
}
/* Komşu olmayan ilk ve son hücrede tek taraflı ayraç yeter — ama tüm hücreye
   simetrik uygulamak görsel tutarlılık sağlar. */
.metric-cell.metric-red    { background: #FEE2E2 !important; color: #991B1B; }
.metric-cell.metric-yellow { background: #FEF3C7 !important; color: #92400E; }
.metric-cell.metric-green  { background: #DCFCE7 !important; color: #166534; }
.analysis-comment-row td {
    background: #FAFAFA;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 8px 16px;
    border-top: none;
    line-height: 1.5;
}
.analysis-comment-row td strong { color: var(--text); margin-right: 4px; }

/* =============================================================================
   MÜŞTERİ paneli — sidebar tree (light mode override over dark sidebar)
   ========================================================================== */
.sidebar .customer-header {
    margin: 0 0 8px;
    padding: 14px 24px 16px;
    border-bottom: 1px solid var(--sidebar-divider);
}
.sidebar .customer-header .label {
    font-size: 10.5px;
    color: var(--sidebar-text-mut);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.sidebar .customer-header .name {
    margin-top: 4px;
    font-size: 14.5px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.sidebar .nav-tree { list-style: none; margin: 0; padding: 0; }
.sidebar .nav-tree li { margin: 0; }
.sidebar .nav-tree details { padding: 0; }
.sidebar .nav-tree summary {
    padding: 9px 24px;
    cursor: pointer;
    font-size: 13px;
    color: var(--sidebar-text);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .12s, color .12s;
}
.sidebar .nav-tree summary:hover { background: rgba(148, 163, 184, .06); color: #fff; }
.sidebar .nav-tree summary::-webkit-details-marker { display: none; }
.sidebar .nav-tree summary::before {
    content: "▸";
    display: inline-block;
    color: var(--sidebar-text-mut);
    transition: transform .15s;
    font-size: 10px;
}
.sidebar .nav-tree details[open] > summary::before { transform: rotate(90deg); }

.sidebar .nav-tree .level-2 summary {
    padding-left: 36px;
    font-size: 11.5px;
    color: var(--sidebar-text-mut);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
}
.sidebar .nav-tree .equipment-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 24px 7px 56px;
    font-size: 13px;
    color: var(--sidebar-text);
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
}
.sidebar .nav-tree .equipment-link:hover {
    background: rgba(148, 163, 184, .06);
    color: #fff;
    text-decoration: none;
}
.sidebar .nav-tree .equipment-link.active {
    background: rgba(37, 99, 235, .14);
    color: #fff;
    font-weight: 500;
    border-left-color: var(--sidebar-active);
    padding-left: 53px;
}

/* =============================================================================
   MOBİL
   ========================================================================== */
@media (max-width: 900px) {
    :root { --sidebar-w: 280px; }
    .sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-h);
        bottom: 0;
        width: 80%;
        max-width: 300px;
        z-index: 60;
        transition: left .25s ease;
        box-shadow: var(--shadow-lg);
        max-height: none;
    }
    .sidebar.open { left: 0; }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: var(--header-h) 0 0 0;
        background: rgba(15, 23, 42, .5);
        z-index: 55;
        backdrop-filter: blur(2px);
    }
    .sidebar-backdrop.open { display: block; }
    .main { padding: 18px 16px; }
    .app-header { padding: 0 14px; }
    .app-header .brand { font-size: 14px; }
    .app-header .brand img { max-height: 30px; }
    .app-header .user-info { gap: 10px; font-size: 12px; }
    .table th, .table td { padding: 9px 10px; font-size: 12.5px; }
    .auth-card { padding: 28px 20px; }
    .page-header h1 { font-size: 19px; }
    .stat .value { font-size: 24px; }
    .card-body { padding: 16px; }
}
@media (min-width: 901px) {
    .menu-toggle { display: none !important; }
    .sidebar-backdrop { display: none !important; }
}

/* =============================================================================
   DASHBOARD — alert banner, status board, mini dots
   ========================================================================== */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 22px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-xs);
}
.alert-banner-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-weight: 700;
}
.alert-banner-text { flex: 1; min-width: 0; }
.alert-banner-text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}
.alert-banner-text .sub { font-size: 13px; color: var(--text-muted); }
.alert-banner.danger {
    background: linear-gradient(to right, var(--danger-bg) 0%, #FFFFFF 100%);
    border-color: var(--danger-border);
}
.alert-banner.danger .alert-banner-icon { background: var(--danger); color: #fff; }
.alert-banner.warning {
    background: linear-gradient(to right, var(--warning-bg) 0%, #FFFFFF 100%);
    border-color: var(--warning-border);
}
.alert-banner.warning .alert-banner-icon { background: var(--warning); color: #fff; }
.alert-banner.success {
    background: linear-gradient(to right, var(--success-bg) 0%, #FFFFFF 100%);
    border-color: var(--success-border);
}
.alert-banner.success .alert-banner-icon { background: var(--success); color: #fff; }

/* Mini metrik renk noktaları (status board) */
.metric-dots { display: inline-flex; gap: 4px; align-items: center; }
.metric-dot {
    width: 14px; height: 14px;
    border-radius: 3px;
    background: #E5E7EB;
    border: 1px solid rgba(0,0,0,.06);
    cursor: help;
    transition: transform .12s;
}
.metric-dot:hover { transform: scale(1.3); }
.metric-dot.dot-red    { background: #DC2626; }
.metric-dot.dot-yellow { background: #F59E0B; }
.metric-dot.dot-green  { background: #16A34A; }

/* Status badge */
.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.status-badge::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-red    { background: #FEE2E2; color: #991B1B; }
.status-red::before    { background: #DC2626; }
.status-yellow { background: #FEF3C7; color: #92400E; }
.status-yellow::before { background: #F59E0B; }
.status-green  { background: #DCFCE7; color: #166534; }
.status-green::before  { background: #16A34A; }
.status-none   { background: var(--bg-soft); color: var(--text-soft); }
.status-none::before   { background: #CBD5E1; }

/* Equipment health card (müşteri dashboard) */
.eq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    border-left: 4px solid var(--border-strong);
}
.eq-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.eq-card.eq-red    { border-left-color: var(--danger); }
.eq-card.eq-yellow { border-left-color: var(--warning); }
.eq-card.eq-green  { border-left-color: var(--success); }
.eq-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}
.eq-breadcrumb {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 2px;
}
.eq-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    letter-spacing: -.01em;
}
.eq-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.eq-meta strong { color: var(--text); font-weight: 500; }
.eq-metric-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.metric-pill {
    display: inline-flex;
    flex-direction: column;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-soft);
    color: var(--text-muted);
    border: 1px solid var(--border);
    line-height: 1.2;
    min-width: 64px;
}
.metric-pill .label { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; opacity: .8; }
.metric-pill .value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
    color: var(--text);
}
.metric-pill.metric-red    { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.metric-pill.metric-red .value { color: #991B1B; }
.metric-pill.metric-yellow { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.metric-pill.metric-yellow .value { color: #92400E; }
.metric-pill.metric-green  { background: #DCFCE7; color: #166534; border-color: #BBF7D0; }
.metric-pill.metric-green .value { color: #166534; }
.eq-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.eq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

/* Activity feed */
.activity-feed { list-style: none; padding: 0; margin: 0; }
.activity-feed li {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.activity-feed li:last-child { border-bottom: none; }
.activity-feed .act-icon {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    border: 1px solid var(--border);
}
.activity-feed .act-content { flex: 1; min-width: 0; }
.activity-feed .act-time { color: var(--text-muted); font-size: 11.5px; }

/* Compact equipment table (admin status board) */
.status-table th, .status-table td {
    padding: 10px 12px;
    font-size: 13px;
}
.status-table .breadcrumb-small {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}
.status-table .eq-name-small {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

/* Hero greeting (customer) */
.hero-greeting {
    background: linear-gradient(135deg, #1E40AF 0%, #2563EB 50%, #0891B2 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 22px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.hero-greeting::after {
    content: "";
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}
.hero-greeting h1 {
    color: #fff;
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
}
.hero-greeting p { margin: 0; opacity: .9; font-size: 14px; max-width: 700px; }
.hero-greeting .hero-stats {
    display: flex; gap: 24px; flex-wrap: wrap;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}
.hero-greeting .hero-stat .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    opacity: .8;
}
.hero-greeting .hero-stat .value {
    font-size: 24px; font-weight: 600;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* =============================================================================
   DİSK BAR (dashboard widget)
   ========================================================================== */
.disk-bar {
    position: relative;
    height: 14px;
    background: var(--bg-soft);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.disk-bar-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    background: var(--success);
    transition: width .3s ease;
    border-radius: 999px;
}
.disk-bar-threshold {
    position: absolute;
    top: -2px; bottom: -2px;
    width: 2px;
    background: rgba(15, 23, 42, .35);
    cursor: help;
}
.disk-segment {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
}

/* =============================================================================
   YARDIMCI
   ========================================================================== */
.text-muted { color: var(--text-muted); }
.text-soft  { color: var(--text-soft); }
.text-right { text-align: right; }
.text-center{ text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.flex-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.divider { border-top: 1px solid var(--border); margin: 16px 0; }
.error-text { color: var(--danger); font-size: 13px; margin-top: 4px; }
code, kbd, samp { font-family: var(--font-mono); font-size: .92em; }
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
