/* ==========================================================================
   BARİYER SERVİS - GENEL, NEON TEMA VE TÜM MODÜL STİLLERİ (GÜNCEL TAM KOD)
   ========================================================================== */
:root {
    --bg-color: #080a0f;
    --card-bg: #101622;
    --border-color: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --neon-cyan: #00f3ff;
    --neon-green: #39ff14;
    --neon-red: #ff0055;
    --glow-cyan: 0 0 12px rgba(0, 243, 255, 0.4);
    --glow-red: 0 0 12px rgba(255, 0, 85, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

html, body {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    line-height: 1.6;
    padding-bottom: 2rem;
    min-height: 100vh;
    overflow-x: hidden !important;
    width: 100%;
}

.app-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 0.8rem;
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   GRID DÜZENLERİ
   -------------------------------------------------------------------------- */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.2rem;
    align-items: start;
    width: 100%;
}

.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    width: 100%;
}

/* --------------------------------------------------------------------------
   SİMÜLATOR ALANI
   -------------------------------------------------------------------------- */
.sim-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.barrier-stage {
    height: 320px;
    position: relative;
    margin: 1rem auto;
    width: 100%;
    max-width: 600px;
    border-bottom: 3px solid #334155;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.barrier-wrapper {
    position: relative;
    width: 480px;
    max-width: 90%;
    height: 280px;
    display: flex;
    align-items: flex-end;
}

.barrier-base {
    width: 44px;
    height: 90px;
    background: #1e293b;
    border: 2px solid var(--neon-cyan);
    border-radius: 6px 6px 0 0;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.barrier-light {
    width: 12px;
    height: 12px;
    background: var(--neon-red);
    border-radius: 50%;
    margin: 8px auto;
    box-shadow: var(--glow-red);
    transition: background 0.3s, box-shadow 0.3s;
}

.barrier-arm {
    width: 260px;
    height: 10px;
    background: repeating-linear-gradient(45deg, #fff, #fff 14px, #ff0055 14px, #ff0055 28px);
    position: absolute;
    bottom: 72px;
    left: 36px;
    transform-origin: left center;
    transform: rotate(0deg);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255,255,255,0.25);
}

.barrier-arm.open {
    transform: rotate(-90deg) !important;
}

.controls {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-sim {
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--neon-cyan);
    background: rgba(0, 243, 255, 0.05);
    color: var(--neon-cyan);
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-sim:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: var(--glow-cyan);
}

/* --------------------------------------------------------------------------
   SEKMELER, FORMLAR VE İLETİŞİM KARTLARI
   -------------------------------------------------------------------------- */
.tabs-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 0.8rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.tab-buttons {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 1.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tab-btn.active {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.form-group {
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-bottom: 0.3rem;
}

.form-control {
    width: 100% !important;
    padding: 0.7rem;
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box !important;
}

.form-control:focus {
    border-color: var(--neon-cyan);
}

.btn-submit, 
.btn-wa-contact, 
.btn-phone-contact {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 0.4rem !important;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.btn-submit {
    background: var(--neon-cyan);
    color: #000;
    border: none;
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: var(--glow-cyan);
}

.sidebar-contact-card {
    background: var(--card-bg);
    border: 1px solid var(--neon-green);
    border-radius: 12px;
    padding: 1.2rem 0.8rem;
    text-align: center;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.1);
    width: 100%;
    box-sizing: border-box !important;
}

.contact-card-title {
    color: #ffffff;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.contact-card-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.btn-wa-contact {
    background: #25D366;
    color: #ffffff !important;
    margin-bottom: 0.6rem;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.2);
}

.btn-phone-contact {
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan) !important;
}

/* --------------------------------------------------------------------------
   YÜZEN SAĞ ALT WHATSAPP BALONCUĞU
   -------------------------------------------------------------------------- */
.fixed-wa-bubble {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    width: 58px !important;
    height: 58px !important;
    background-color: #25D366 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.6) !important;
    z-index: 999999 !important;
    text-decoration: none !important;
    transition: transform 0.2s ease;
}

.fixed-wa-bubble:hover {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   GALERİ VE LIGHTBOX
   -------------------------------------------------------------------------- */
.gallery-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem 0.8rem;
    margin-top: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.gallery-item {
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--neon-cyan);
}

.gallery-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
}

.gallery-info {
    padding: 0.8rem;
}

.gallery-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.gallery-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.88);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 0.8rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    max-width: 750px;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--neon-cyan);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.modal-img-container {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.modal-body {
    padding: 1rem;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   PLAKA TANIMA DEMO PANELS (ANPR & ENTERPRISE)
   -------------------------------------------------------------------------- */
.anpr-enterprise-container {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.anpr-topbar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.anpr-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.anpr-brand h2 {
    font-size: 1.2rem;
    color: #fff;
}

.anpr-brand span {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 2px 6px;
    border-radius: 4px;
}

.anpr-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.anpr-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.cam-feed-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.cam-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.cam-viewport {
    position: relative;
    width: 100%;
    height: 380px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cam-viewport video, .cam-viewport img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cam-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hud-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hud-scanner {
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    animation: scanAnim 1.5s infinite alternate ease-in-out;
}

@keyframes scanAnim {
    from { top: 0%; }
    to { top: 95%; }
}

.hud-box {
    position: absolute;
    bottom: 25%;
    left: 20%;
    width: 60%;
    height: 25%;
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
    border-radius: 6px;
}

.hud-tag {
    position: absolute;
    top: -24px;
    left: 0;
    background: var(--neon-green);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
}

.cam-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-cam {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--neon-cyan) !important;
    color: #000 !important;
    flex: 2 !important;
}

.anpr-logs-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.anpr-logs-card h3 {
    font-size: 1rem;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
}

.anpr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.anpr-table th, .anpr-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.mini-plate {
    background: #fff;
    color: #000;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    border-left: 8px solid #003399;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
}

.badge-success { background: rgba(57, 255, 20, 0.15); color: var(--neon-green); border: 1px solid var(--neon-green); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid #f59e0b; }
.badge-danger { background: rgba(255, 0, 85, 0.15); color: var(--neon-red); border: 1px solid var(--neon-red); }
.badge-cyan { background: rgba(0, 243, 255, 0.15); color: var(--neon-cyan); border: 1px solid var(--neon-cyan); }

.detection-card, .access-info-card, .relay-control-card, .sales-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tr-plate-large {
    display: inline-block;
    background: #ffffff;
    color: #000;
    font-weight: 900;
    font-size: 1.8rem;
    padding: 6px 24px;
    border: 3px solid #000;
    border-radius: 8px;
    border-left: 22px solid #003399;
    letter-spacing: 2px;
    margin: 0.8rem 0;
    font-family: monospace;
}

.plate-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    background: #090d16;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.access-status {
    font-size: 1.3rem;
    font-weight: 900;
    margin: 0.5rem 0;
    color: var(--neon-cyan);
}

.access-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.relay-btns {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.btn-relay {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-open { background: var(--neon-green); color: #000; }
.btn-close { background: var(--neon-red); color: #fff; }

.sales-card {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.btn-sales-wa {
    display: block;
    margin-top: 1rem;
    padding: 0.8rem;
    background: #25D366;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   ABONE MÜŞTERİ YÖNETİM PANELİ STİLLERİ
   -------------------------------------------------------------------------- */
.client-dashboard-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.client-badge {
    background: rgba(0, 243, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}

.client-plan-card {
    display: flex;
    gap: 1.5rem;
    background: #090d16;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.client-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

.client-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.stat-title {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.stat-box strong {
    font-size: 1.1rem;
    color: #fff;
}

.payment-quick-box {
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.btn-pay-manage {
    width: 100%;
    padding: 0.65rem;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.add-plate-card, .plate-list-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.add-plate-form {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.btn-add-plate {
    padding: 0.75rem 1.2rem;
    background: var(--neon-cyan);
    color: #000;
    font-weight: 800;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    height: 40px;
}

.client-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.client-table th, .client-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.btn-del {
    background: rgba(255,0,85,0.1);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   GÜNDÜZ MODU (LIGHT MODE) STİLLERİ
   -------------------------------------------------------------------------- */
body.light-mode {
    --bg-color: #f8fafc !important;
    --card-bg: #ffffff !important;
    --border-color: #e2e8f0 !important;
    --text-color: #0f172a !important;
    --text-muted: #64748b !important;
    --neon-cyan: #0284c7 !important;
}

body.light-mode .sim-card,
body.light-mode .tabs-container,
body.light-mode .gallery-section,
body.light-mode .anpr-logs-card,
body.light-mode .cam-feed-container,
body.light-mode .detection-card,
body.light-mode .access-info-card,
body.light-mode .relay-control-card,
body.light-mode .add-plate-card,
body.light-mode .plate-list-card,
body.light-mode .stat-box {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-mode .sidebar-contact-card {
    background: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .form-control {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

body.light-mode .btn-phone-contact {
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

body.light-mode .gallery-item {
    background: #ffffff !important;
}

/* --------------------------------------------------------------------------
   MOBİL ÖLÇÜ UYARLAMALARI (RESPONSIVE)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .grid-2,
    .anpr-dashboard-grid,
    .client-grid {
        grid-template-columns: 1fr;
    }
    .add-plate-form {
        grid-template-columns: 1fr;
    }
    .barrier-stage {
        height: 240px;
    }
    .barrier-wrapper {
        width: 280px;
        height: 200px;
    }
    .barrier-arm {
        width: 150px;
        bottom: 56px;
    }
}