/*
Theme Name: Ganjeh CP
Theme URI: https://ganjecctv.cloud/
Author: تمامی حقوق مادی و معنوی برای ganjecctv.cloud محفوظ است.
Author URI: https://ganjecctv.cloud

*/

/* =========================
       1) FONT FACE – SHABNAM
       ========================== */

    @font-face {
      font-family: "Shabnam";
      src: url("./assets/fonts/shabnam/Shabnam-FD-WOL.woff2") format("woff2");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }


     @font-face {
      font-family: "Shabnam";
      src: url("./assets/fonts/shabnam/Shabnam-FD-WOL.woff2") format("woff2");
      font-weight: 700;
      font-style: normal;
      font-display: swap;
    }
 

   @font-face {
  font-family: 'Shabnam';
      src: url("./assets/fonts/shabnam/Shabnam-FD-WOL.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
 


/* ===== Base / Global ===== */
body {
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow-y: auto;
    font-family: 'Shabnam', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Sidebar (shared) */
.sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 64px;
    height: 100vh;
    background: #050505;
    border-left: 1px solid #222;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    z-index: 1000;
}
.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.sidebar-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: none;
    background: #151515;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.sidebar-btn:hover {
    background: #222;
    color: #fff;
}
.sidebar-btn.active {
    background: #0d6efd;
    color: #fff;
}

/* Main layout skeleton */
.main-wrapper {
    margin-right: 64px;
    padding: 24px 1.5vw 72px 1.5vw;
    min-height: 100vh;
}
.center-box {
    max-width: 1450px;
    margin: 0 auto;
}
.shell-card {
    background: rgba(16,16,16,0.98);
    border-radius: 22px;
    border: 1px solid #252525;
    padding: 16px 18px 18px;
    box-shadow: 0 0 40px rgba(0,0,0,0.7);
}

/* Shared page header / pills */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.page-title-block h5 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 700;
}
.page-title-block p {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 0;
}
.page-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.page-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #0d6efd;
}

/* Generic section titles */
.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f5f5f5;
    margin-bottom: 4px;
}
.section-subtitle {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
}
hr.section-divider, .section-divider {
    border-color: #333;
    margin: 10px 0;
}

/* Global footer status bar (fixed) */
.footer-status {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 64px;
    background: rgba(20,20,20,0.9);
    color: #ddd;
    font-size: 13px;
    padding: 6px 12px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
}

/* Compact footer status pill (inline variant) */
.footer-status-bar {
    margin-top: 12px;
    border-radius: 999px;
    padding: 5px 11px;
    background: #050505;
    border: 1px solid #202020;
    font-size: 0.72rem;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.footer-status-bar span.label {
    color: #aaa;
}

/* ===== Single Camera / Live View (singlecam) ===== */
.camera-header {
    padding: 16px 20px;
    background: #0c0c0c;
    border-bottom: 1px solid #222;
}
.camera-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}
.camera-sub {
    font-size: 0.8rem;
    color: #aaa;
}

.live-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}


.live-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.live-status {
    position: absolute;
    top: 16px;
    left: 20px;
    background: rgba(0,0,0,0.6);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-wrapper.singlecam-page {
    padding: 16px 1.5vw 40px 1.5vw;      /* کمی padding کمتر تا اسکرول نیاید */
    min-height: 100vh;                   /* همان ارتفاع پایه، اما با padding جدید */
}

.main-wrapper.singlecam-page .live-container {
    height: calc(100vh - 120px);         /* اگر 1-2px اسکرول داشتی، این 120 را بزرگ‌تر کن */
    max-height: calc(100vh - 120px);
}


.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1fff72;
}
.status-dot.error {
    background: #ff5252;
}
.controls-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}
.ctrl-btn {
    background: rgba(0,0,0,0.65);
    border: 1px solid #333;
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: .15s;
}
.ctrl-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== Topbar / Shared dashboard header ===== */
.topbar {
    height: 56px;
    border-bottom: 1px solid #151515;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 5;
    border-radius: 16px;
    margin-bottom: 10px;
}
.topbar-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.topbar-title .main-title {
    font-size: 0.95rem;
    font-weight: 600;
}
.topbar-title .sub-title {
    font-size: 0.75rem;
    color: #aaa;
}
.badge-pill {
    border-radius: 999px;
    border: 1px solid #333;
    padding: 4px 10px;
    background: #101010;
    color: #ddd;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.content-wrapper {
    padding: 8px 4px 0;
}

/* Generic two-column layout (used در چند صفحه) */
.layout-two-cols {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr);
    gap: 12px;
}
@media (max-width: 992px) {
    .layout-two-cols {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Playback player / controls (recordings) ===== */
.player-card {
    background: #050505;
    border-radius: 18px;
    border: 1px solid #151515;
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.player-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.player-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.player-meta .camera-name {
    font-weight: 600;
    font-size: 0.92rem;
}
.player-meta .range-text {
    font-size: 0.78rem;
    color: #aaa;
}
.player-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.player-header-right .status-text {
    font-size: 0.7rem;
    color: #bbb;
}
.player-header-right .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #616161;
}
.player-header-right .status-dot.active {
    background: #fdd835;
    box-shadow: 0 0 8px rgba(255, 215, 53, 0.7);
}
.player-video-wrapper {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    border: 1px solid #151515;
}
.player-video-wrapper video {
    width: 100%;
    display: block;
    background: #000;
}
.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.btn-ghost {
    border-radius: 999px;
    border: 1px solid #333;
    background: #101010;
    color: #eee;
    font-size: 0.76rem;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.07s ease;
}
.btn-ghost:hover:not(:disabled) {
    background: #1c1c1c;
    border-color: #444;
    transform: translateY(-0.5px);
}
.btn-ghost:disabled {
    opacity: 0.4;
    cursor: default;
}
.controls-card {
    background: #050505;
    border-radius: 18px;
    border: 1px solid #151515;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.control-label {
    font-size: 0.75rem;
    color: #bbb;
    margin-bottom: 2px;
}
.control-input select,
.control-input input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #262626;
    background: #101010;
    color: #eee;
    font-size: 0.78rem;
    padding: 5px 10px;
}
.quick-range-btn {
    border-radius: 999px;
    border: 1px solid #333;
    background: #101010;
    color: #eee;
    font-size: 0.72rem;
    padding: 3px 8px;
    cursor: pointer;
}
.quick-range-btn:hover {
    background: #1a1a1a;
}
.status-box {
    border-radius: 12px;
    border: 1px dashed #333;
    background: #040404;
    padding: 8px;
    font-size: 0.75rem;
    color: #aaa;
}

/* ===== People / Faces list + events (people.php / faces.php) ===== */

/* صفحه people – ستون افراد و رویدادها */
.panel-card {
    background: #050505;
    border-radius: 18px;
    border: 1px solid #262626;
    padding: 10px 11px 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 8px;
}
.panel-title {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.panel-title i {
    font-size: 1rem;
    color: #0d6efd;
}
.panel-subtitle {
    font-size: 0.72rem;
    color: #aaa;
}
.panel-header-right {
    text-align: right;
    font-size: 0.72rem;
    color: #888;
}

/* ستون افراد – people.php نسخه ۱ */
.people-list-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.people-list {
    margin-top: 4px;
    flex: 1;
    min-height: 160px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 4px;
}
@media (max-width: 992px) {
    .people-list {
        max-height: 280px;
    }
}

/* person-card (ورژن لیستی people.php) */
.person-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px;
    padding: 7px 7px;
    margin-bottom: 6px;
    background: #050505;
    border-radius: 16px;
    border: 1px solid #262626;
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.person-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13,110,253,.55);
    transform: translateY(-1px);
}
.person-card.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13,110,253,.55);
    background: radial-gradient(circle at top left, rgba(13,110,253,0.25) 0, #050505 45%);
}
.person-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: #101010;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #777;
}
.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.person-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.person-name-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.person-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.person-unknown-pill {
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid #ff6b6b;
    color: #ffc4c4;
}
.person-events-count {
    font-size: 0.74rem;
    color: #ddd;
}
.person-meta-line {
    margin-top: 3px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}
.person-lastseen {
    font-size: 0.72rem;
    color: #999;
}
.person-meta-line span {
    font-size: 0.7rem;
}
.people-footer {
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px dashed #333;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.72rem;
    color: #999;
}
.people-footer span.label {
    color: #777;
}

/* ستون رویدادها – people.php */
.events-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.events-toolbar-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.events-count-info {
    font-size: 0.8rem;
    color: #ccc;
}
.events-count-info strong {
    font-weight: 700;
}
.events-inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.73rem;
    border: 1px solid #333;
    background: #080808;
}
.stat-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}
.stat-pill .dot.total {
    background: #0d6efd;
}
.stat-pill .dot.range {
    background: #6f42c1;
}
.stat-pill span.label {
    color: #aaa;
}
.stat-pill span.value {
    font-weight: 600;
}
.filters-row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.filter-chip {
    background: #0a0a0a;
    border-radius: 999px;
    border: 1px solid #333;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}
.filter-chip-label {
    color: #aaa;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.filter-chip select,
.filter-chip input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.75rem;
}
.filter-chip input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}
.filter-chip select option {
    color: #000;
}
.filter-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.btn-filter {
    font-size: 0.75rem;
    border-radius: 999px;
    padding: 4px 10px;
}
.events-list {
    margin-top: 8px;
    flex: 1;
    min-height: 200px;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    padding-right: 3px;
}
@media (max-width: 992px) {
    .events-list {
        max-height: 360px;
    }
}
.event-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 16px;
    background: #050505;
    border: 1px solid #262626;
    margin-bottom: 7px;
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease, background .12s ease;
}
.event-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13,110,253,.55);
    transform: translateY(-1px);
}
.event-card.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13,110,253,.55);
    background: radial-gradient(circle at top left, rgba(13,110,253,0.25) 0, #050505 45%);
}
.event-thumb-wrap {
    width: 104px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #101010;
    border: 1px solid #333;
}
.event-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.event-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.event-title-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.event-person-name {
    font-size: 0.8rem;
    font-weight: 600;
}
.event-time {
    font-size: 0.72rem;
    color: #bbb;
    white-space: nowrap;
}
.event-meta-line {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.event-meta-line i {
    font-size: 0.8rem;
}
.event-tags {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.event-tag {
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid #333;
    color: #ddd;
    background: #080808;
}
.events-empty {
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
    padding: 18px 0;
}
.events-footer-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: #999;
}
.page-indicator {
    min-width: 80px;
    text-align: center;
}
.page-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.page-controls .btn {
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.72rem;
}

/* Modal dark theme (shared) */
.modal-dark .modal-content {
    background: #050505;
    color: #fff;
    border-radius: 18px;
    border: 1px solid #333;
}
.modal-dark .modal-header {
    border-bottom-color: #222;
}
.modal-dark .modal-footer {
    border-top-color: #222;
}
.event-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 12px;
}
.event-detail-media {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.event-detail-media img,
.event-detail-media video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #333;
    background: #000;
}
.event-detail-meta {
    font-size: 0.75rem;
}
.event-detail-meta dt {
    color: #aaa;
    margin-bottom: 2px;
}
.event-detail-meta dd {
    margin-bottom: 6px;
}
@media (max-width: 992px) {
    .event-detail-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Faces management (faces.php) – لیست چهره‌ها ===== */
.faces-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 16px;
}
.faces-list-card {
    background: #050505;
    border-radius: 16px;
    border: 1px solid #222;
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.face-detail-card {
    background: #050505;
    border-radius: 16px;
    border: 1px solid #222;
    padding: 10px 12px 12px;
    min-height: 420px;
}
.faces-toolbar {
    margin-bottom: 8px;
}
.faces-list {
    margin-top: 6px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 260px);
    padding-right: 4px;
}
.faces-list::-webkit-scrollbar {
    width: 6px;
}
.faces-list::-webkit-scrollbar-track {
    background: transparent;
}
.faces-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 999px;
}
.face-item {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    background: rgba(15,15,15,0.8);
    transition: all 0.12s ease;
}
.face-item:hover {
    background: rgba(30,30,30,0.9);
}
.face-item.active {
    border-color: #0d6efd;
    background: rgba(13,110,253,0.16);
}
.face-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #0d6efd, #141414);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    font-weight: 600;
}
.face-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}
.face-meta {
    font-size: 0.75rem;
    color: #aaa;
}
.face-count-pill {
    margin-left: auto;
    border-radius: 999px;
    border: 1px solid #444;
    padding: 2px 7px;
    font-size: 0.7rem;
    color: #ccc;
}
.empty-state {
    border-radius: 12px;
    border: 1px dashed #444;
    padding: 12px;
    font-size: 0.78rem;
    color: #aaa;
    text-align: center;
    background: rgba(0,0,0,0.3);
}
.face-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.face-detail-sub {
    font-size: 0.78rem;
    color: #aaa;
}
.rename-form {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
}
.rename-form input {
    max-width: 150px;
}
.face-actions-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-top: 10px;
}
.small-label {
    font-size: 0.78rem;
    color: #bbb;
    margin-bottom: 2px;
}
.form-control-sm-dark,
.form-control-sm-dark:focus {
    font-size: 0.8rem;
    background-color: #111;
    color: #eee;
    border-color: #333;
}
.face-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}
.face-img-item {
    border-radius: 10px;
    border: 1px solid #333;
    background: #111;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.face-img-thumb {
    width: 100%;
    height: 96px;
    object-fit: cover;
    background: #000;
}
.face-img-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    font-size: 0.7rem;
}
.face-img-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.face-recognition-card {
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 8px 10px;
    background: #0a0a0a;
}
.face-rec-result {
    font-size: 0.8rem;
}
.score-badge {
    border-radius: 999px;
    padding: 2px 8px;
    border: 1px solid #444;
    font-size: 0.75rem;
}
.score-good {
    color: #7CFFB5;
}
.score-medium {
    color: #FFE38A;
}
.score-bad {
    color: #FF9CA1;
}
.text-mono {
    font-family: "SF Mono", "Fira Code", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.alert-compact {
    font-size: 0.78rem;
    padding: 6px 8px;
}

/* ===== Cameras list (list.php) ===== */
.camera-card {
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid #333;
    border-radius: 18px;
    padding: 18px 24px 20px;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.page-header-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
}
.stat-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.stat-pill span,
.stat-pill span.count {
    font-weight: 600;
    margin-inline: 2px;
    color: #fff;
}
.toolbar {
    margin-top: 14px;
    margin-bottom: 6px;
}
.toolbar .form-control,
.toolbar .form-select {
    background-color: #111 !important;
    border-color: #444 !important;
    color: #fff !important;
    font-size: 0.8rem;
}
.toolbar .form-control::placeholder {
    color: #777;
}
.btn-outline-light.btn-sm {
    border-color: #555;
    color: #ddd;
    font-size: 0.8rem;
}
.btn-outline-light.btn-sm:hover {
    background: #f5f5f5;
    color: #000;
}
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}
.camera-table {
    font-size: 0.8rem;
    margin-bottom: 0;
    white-space: normal;
}
.camera-table thead tr {
    background: #141414;
}
.camera-table thead th {
    border-color: #333 !important;
    color: #b9b9b9;
    font-weight: 600;
}
.camera-table tbody tr {
    border-color: #222 !important;
}
.camera-table tbody tr:hover {
    background: rgba(0, 123, 255, 0.08);
}
.camera-name {
    font-weight: 600;
    color: #f5f5f5;
}
.camera-meta {
    font-size: 0.72rem;
    color: #888;
}
.badge-status {
    font-size: 0.7rem;
    padding: 4px 9px;
    border-radius: 999px;
}
.badge-online {
    background: rgba(40, 167, 69, 0.12);
    color: #7CFFB5;
    border: 1px solid rgba(40,167,69,0.5);
}
.badge-offline {
    background: rgba(220, 53, 69, 0.15);
    color: #FF9CA1;
    border: 1px solid rgba(220,53,69,0.5);
}
.badge-degraded {
    background: rgba(255, 193, 7, 0.15);
    color: #FFE38A;
    border: 1px solid rgba(255,193,7,0.6);
}
.pill {
    font-size: 0.7rem;
    padding: 3px 7px;
    border-radius: 999px;
    background: #151515;
    border: 1px solid #333;
    color: #aaa;
    display: inline-block;
    margin-bottom: 2px;
}
.action-buttons .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
@media (max-width: 991.98px) {
    .center-box {
        max-width: 100%;
    }
    .page-header > div:last-child {
        align-self: flex-end;
    }
}

/* ===== Dashboard live grid (dashboard.php) ===== */
.layout-two-cols.dashboard-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    margin-top: 4px;
}
.cameras-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.cameras-panel-header h6 {
    font-size: 0.85rem;
    margin: 0;
}
.view-toggle {
    display: inline-flex;
    gap: 4px;
    background: #101010;
    border-radius: 999px;
    padding: 2px;
    border: 1px solid #333;
    font-size: 0.78rem;
}
.view-toggle button {
    border: none;
    background: transparent;
    color: #aaa;
    padding: 3px 8px;
    border-radius: 999px;
    cursor: pointer;
}
.view-toggle button.active {
    background: #0d6efd;
    color: #fff;
}
.camera-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.camera-filters .form-control {
    background: #101010 !important;
    border: 1px solid #333 !important;
    color: #eee !important;
    font-size: 0.78rem;
}
.camera-filters .form-control::placeholder {
    color: #777 !important;
}
.camera-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.camera-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cam-tile {
    position: relative;
    background: #050505;
    border-radius: 18px;
    border: 1px solid #262626;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}
.cam-tile:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13,110,253,0.7);
    transform: translateY(-1px);
}
.cam-tile.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13,110,253,0.7);
}
.cam-video-wrapper {
    position: relative;
    height: 190px;
    background: #000;
}
.cam-video-wrapper.compact {
    height: 140px;
}
.cam-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}
.cam-badge-status {
    position: absolute;
    top: 7px;
    right: 9px;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.7rem;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cam-badge-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #29d344;
}
.cam-badge-status.offline .dot {
    background: #ff4d4f;
}
.cam-mute-btn {
    position: absolute;
    top: 7px;
    left: 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.7);
    color: #eee;
    font-size: 0.7rem;
    padding: 2px 8px;
    cursor: pointer;
}
.cam-meta {
    padding: 7px 10px 8px;
    font-size: 0.74rem;
}
.cam-name {
    font-weight: 600;
    color: #f5f5f5;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cam-location {
    color: #aaa;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cam-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}
.cam-tag-pill {
    border-radius: 999px;
    background: #101010;
    border: 1px solid #333;
    padding: 1px 6px;
    font-size: 0.7rem;
    color: #ccc;
}
.cam-footer-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #aaa;
}
.cam-live-btn {
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.7rem;
}

/* Dashboard events panel */
.events-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.events-panel-header h6 {
    font-size: 0.85rem;
    margin: 0;
}
.events-panel-header .btn-sm {
    font-size: 0.7rem;
}
.events-list.dashboard-events {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 2px;
}
.event-card.dashboard-event {
    display: flex;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid #262626;
    background: #050505;
    margin-bottom: 6px;
    padding: 5px 6px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.event-card.dashboard-event:hover {
    background: #101010;
    border-color: #0d6efd;
}
.event-thumb {
    width: 90px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
    flex-shrink: 0;
}
.event-info {
    flex: 1;
    min-width: 0;
}
.event-label {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #f5f5f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-meta-line.dashboard-meta {
    font-size: 0.7rem;
    color: #b9b9b9;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-tags.dashboard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.66rem;
}
.event-tag-pill {
    border-radius: 999px;
    background: #101010;
    border: 1px solid #333;
    padding: 1px 6px;
    color: #ccc;
}
@media (max-width: 991.98px) {
    .layout-two-cols.dashboard-layout {
        grid-template-columns: 1fr;
    }
    .events-list.dashboard-events {
        max-height: none;
    }
}

/* ===== Login / Auth page ===== */
.auth-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
.auth-card {
    background: radial-gradient(circle at top left, #1b1b1b 0%, #0a0a0a 40%, #050505 100%);
    border-radius: 22px;
    border: 1px solid #262626;
    padding: 20px 22px 18px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}
.logo-holder {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    margin: 0 auto 10px;
    background: radial-gradient(circle at 30% 20%, #0d6efd 0%, #0a58ca 35%, #020817 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
}
.logo-holder img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
}
.auth-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.auth-subtitle {
    text-align: center;
    font-size: 0.8rem;
    color: #b3b3b3;
    margin-bottom: 14px;
}
.form-label {
    font-size: 0.8rem;
    color: #ddd;
}
.form-control.bg-dark {
    background-color: #101010 !important;
    border-color: #333 !important;
    color: #fff !important;
    font-size: 0.82rem;
}
.form-control.bg-dark::placeholder {
    color: #777 !important;
}
.input-group-text {
    background-color: #101010 !important;
    border-color: #333 !important;
    color: #777 !important;
    font-size: 0.85rem;
}
.form-check-label {
    font-size: 0.78rem;
    color: #c4c4c4;
}
.auth-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    margin-top: 8px;
    color: #9a9a9a;
}
.auth-footer-links a {
    color: #e0e0e0;
    text-decoration: none;
}
.auth-footer-links a:hover {
    text-decoration: underline;
}
.btn-auth {
    font-size: 0.86rem;
    border-radius: 999px;
    padding: 7px 0;
}
.divider-text {
    text-align: center;
    font-size: 0.72rem;
    color: #777;
    margin: 10px 0 6px;
    position: relative;
}
.divider-text::before,
.divider-text::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #222;
}
.divider-text::before {
    right: 0;
}
.divider-text::after {
    left: 0;
}
.btn-outline-auth {
    font-size: 0.78rem;
    border-radius: 999px;
    border-color: #444;
    color: #ddd;
}
.btn-outline-auth:hover {
    background: #f8f9fa;
    color: #000;
}
.auth-meta-text {
    font-size: 0.74rem;
    color: #777;
    text-align: center;
    margin-top: 8px;
}
@media (max-width: 768px) {
    .main-wrapper {
        padding: 16px 12px 70px 12px;
    }
    .auth-card {
        padding: 18px 16px 16px;
    }
}

/* ===== Add camera (add-camera.php) ===== */
.form-control.bg-dark,
.form-select.bg-dark {
    background-color: #111 !important;
    color: #fff !important;
    border-color: #444 !important;
}
.form-check-label {
    font-size: 0.85rem;
}
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545 !important;
}
.invalid-msg {
    font-size: 0.75rem;
    color: #f28b82;
    margin-top: 3px;
}
.adding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.adding-box {
    background: #111;
    border-radius: 18px;
    padding: 20px 26px;
    border: 1px solid #333;
    text-align: center;
    min-width: 260px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}
.adding-box h6 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.adding-box p {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0;
}
@media (max-width: 991.98px) {
    .center-box {
        max-width: 100%;
    }
}

/* ===== Car / plate report (car.php) – people-like layout ===== */
.people-gallery-wrapper {
    margin-top: 10px;
    margin-bottom: 14px;
}
.people-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.people-gallery-header h6 {
    font-size: 0.88rem;
    margin: 0;
}
.people-gallery-header small {
    font-size: 0.72rem;
    color: #aaa;
}
.people-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.people-gallery::-webkit-scrollbar {
    height: 6px;
}
.people-gallery::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.16);
    border-radius: 999px;
}
/* توجه: این .person-card برای car.php است (کارت افقی) */
.person-card.car-card {
    min-width: 220px;
    max-width: 240px;
    background: linear-gradient(135deg, rgba(42,42,46,0.95), rgba(12,12,16,0.95));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.person-card.car-card.active {
    border-color: #0d6efd;
    box-shadow: 0 0 20px rgba(13,110,253,0.4);
    background: radial-gradient(circle at top left, rgba(13,110,253,0.25), rgba(12,12,16,0.96));
}
.person-main.car-main {
    display: flex;
    align-items: center;
    gap: 10px;
}
.person-avatar.car-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 10px rgba(0,0,0,0.7);
}
.person-avatar.car-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.person-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.person-name {
    font-size: 0.85rem;
    font-weight: 600;
}
.person-tagline {
    font-size: 0.72rem;
    color: #ccc;
}
.person-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #bbb;
}
.person-meta i {
    font-size: 0.85rem;
}
.events-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 12px;
}
@media (max-width: 992px) {
    .events-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }
}
.events-panel {
    background: radial-gradient(circle at top left, rgba(18,18,22,1), rgba(6,6,10,1));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 12px 12px 10px;
}
.events-panel-header.car-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.events-panel-header.car-header h6 {
    font-size: 0.88rem;
    margin: 0;
}
.events-panel-header.car-header small {
    font-size: 0.74rem;
    color: #aaa;
}
.events-list.car-events {
    max-height: 440px;
    overflow-y: auto;
    padding-right: 2px;
}
.events-list.car-events::-webkit-scrollbar {
    width: 6px;
}
.events-list.car-events::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
}
.event-card-person {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 10px;
    background: rgba(10,10,14,0.96);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    padding: 8px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.event-card-person:hover {
    border-color: rgba(13,110,253,0.9);
    background: radial-gradient(circle at top left, rgba(13,110,253,0.15), rgba(10,10,14,0.96));
    transform: translateY(-1px);
}
.event-thumb-wrap {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #111;
}
.event-thumb-big {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.event-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
}
.event-title-line span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.72rem;
    color: #ccc;
}
.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.event-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}
.event-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.event-actions .btn-sm {
    font-size: 0.72rem;
}
.events-empty {
    font-size: 0.8rem;
    color: #bbb;
    padding: 18px 8px;
    text-align: center;
}
.events-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #aaa;
}
.stats-panel {
    background: radial-gradient(circle at top right, rgba(22,22,32,1), rgba(6,6,10,1));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 10px 12px;
    font-size: 0.8rem;
}
.stats-panel h6 {
    font-size: 0.86rem;
    margin-bottom: 6px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 6px;
}
.stat-box {
    background: rgba(0,0,0,0.7);
    border-radius: 12px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.stat-label {
    font-size: 0.72rem;
    color: #bbb;
    margin-bottom: 2px;
}
.stat-value {
    font-size: 0.9rem;
    font-weight: 600;
}
.current-filter-badge {
    margin-top: 4px;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.2);
}
.modal-dark .modal-content.car-modal {
    background: #050509;
}
.modal-meta dt {
    font-size: 0.78rem;
    color: #bbb;
}
.modal-meta dd {
    font-size: 0.8rem;
    margin-bottom: 4px;
}
@media (max-width: 576px) {
    .event-card-person {
        grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.6fr);
        grid-template-rows: auto auto;
    }
    .event-thumb-wrap {
        grid-column: 1 / span 2;
    }
    .event-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}




/* ===== Singlecam loading state ===== */
.singlecam-dimmed {
    opacity: 0.25;
    filter: blur(1px);
    pointer-events: none;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.singlecam-ready {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

.loading-note {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 6px;
}



/* People page – جلوگیری از اسکرول بیرونی، فقط لیست‌ها اسکرول شوند */
.main-wrapper.people-page {
    padding-bottom: 40px; /* قبلاً 72 بود، کمی کمترش می‌کنیم */
}

/* ارتفاع لیست افراد و لیست رویدادها را کمی کوتاه‌تر کن تا جمعاً از ۱۰۰vh بیشتر نشوند */
.main-wrapper.people-page .people-list,
.main-wrapper.people-page .events-list {
    max-height: calc(100vh - 260px);
}



/* Logout Modal – Ganjeh UI */
.logout-modal {
    background: linear-gradient(180deg, #141414, #0f0f0f);
    color: #f1f1f1;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

.logout-modal .modal-title {
    font-size: 0.95rem;
}

.logout-modal .modal-body p {
    font-size: 0.85rem;
}

.logout-modal .btn-danger {
    background: linear-gradient(135deg, #dc3545, #a71d2a);
    border: none;
}

.logout-modal .btn-outline-secondary {
    border-color: #444;
    color: #ddd;
}

.logout-modal .btn-outline-secondary:hover {
    background: #2a2a2a;
}
