/* ═══════════════════════════════════════════════════════
   DEAFINITY — Professional Design System
   White-base · Clean · Responsive
═══════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────── */
:root {
    --primary:        #1a56db;
    --primary-hover:  #1347c0;
    --primary-light:  #3b82f6;
    --primary-soft:   rgba(26, 86, 219, 0.08);
    --primary-border: rgba(26, 86, 219, 0.2);

    --bg:         #ffffff;
    --bg-subtle:  #f7f9fc;
    --card:       #ffffff;
    --border:     #e5e7eb;
    --border-dark:#d1d5db;

    --text:       #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --green:      #059669;
    --green-soft: rgba(5, 150, 105, 0.08);
    --red:        #dc2626;
    --red-soft:   rgba(220, 38, 38, 0.08);
    --amber:      #d97706;
    --amber-soft: rgba(217, 119, 6, 0.08);
    --purple:     #7c3aed;
    --purple-soft:rgba(124, 58, 237, 0.08);
    --indigo:     #4338ca;
    --indigo-soft:rgba(67, 56, 202, 0.08);

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;
    --radius-xl:  22px;

    --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
    --shadow-sm:  0 2px 6px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:  0 4px 16px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg:  0 12px 32px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
    --shadow-xl:  0 24px 48px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);

    --navbar-h:   64px;
    --trans:      all .2s ease;
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-subtle);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ══════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════ */
.site-navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    height: var(--navbar-h);
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: var(--shadow-xs);
}

.site-navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Brand */
.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 28px;
}

.nav-link-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--trans);
    white-space: nowrap;
}

.nav-link-item:hover { color: var(--text); background: var(--bg-subtle); }
.nav-link-item.active { color: var(--primary); background: var(--primary-soft); }

/* Navbar dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    z-index: 999;
    padding: 6px 0;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--trans);
}
.nav-dropdown-item:hover { background: var(--bg-subtle); color: var(--text); }

/* Nav right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.nav-user-chip strong { color: var(--text); font-weight: 600; }

.nav-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: .75rem; flex-shrink: 0;
}

/* Hamburger */
.navbar-toggler-custom {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    margin-left: auto;
    transition: var(--trans);
}
.navbar-toggler-custom:hover { background: var(--bg-subtle); }
.hamburger-line {
    display: block; width: 20px; height: 2px;
    background: var(--text); border-radius: 2px;
    margin: 4px 0; transition: var(--trans);
}

/* Mobile nav */
.nav-mobile-menu {
    display: none;
    position: absolute;
    top: var(--navbar-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px 0;
    z-index: 1039;
}

.nav-mobile-menu.open { display: block; }

.nav-mobile-link {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    font-size: .9rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none;
    transition: var(--trans);
}
.nav-mobile-link:hover { color: var(--text); background: var(--bg-subtle); }
.nav-mobile-divider { height: 1px; background: var(--border); margin: 8px 16px; }

@media (max-width: 991px) {
    .nav-links, .nav-right { display: none !important; }
    .navbar-toggler-custom { display: block; }
    .site-navbar .container { position: relative; }
}

/* ══════════════════════════════════════════════════
   STORY BAR
══════════════════════════════════════════════════ */
.story-bar-section {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.story-bar-header {
    padding: 10px 0 4px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.story-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.story-bar::-webkit-scrollbar { display: none; }

.story-item { text-align: center; flex-shrink: 0; cursor: pointer; }

.story-ring {
    width: 58px; height: 58px; border-radius: 50%; padding: 2.5px;
    background: linear-gradient(135deg, #f97316, #ec4899, #a855f7);
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s;
}
.story-ring:hover { transform: scale(1.06); }
.story-ring-inner {
    width: 100%; height: 100%; border-radius: 50%; background: #fff;
    padding: 2px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.story-letter {
    width: 100%; height: 100%; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1rem;
}

/* İzlenmiş durum — çerçeve ve içerik gri görünsün */
.story-ring.viewed { background: #cbd5e1; }
.story-ring.viewed .story-ring-inner img { filter: grayscale(1); opacity: .75; }
.story-ring.viewed .story-letter { background: #94a3b8; }
.story-add-ring {
    width: 58px; height: 58px; border-radius: 50%;
    border: 2px dashed #cbd5e1; background: var(--bg-subtle);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.6rem; font-weight: 300;
    transition: var(--trans); cursor: pointer;
}
.story-add-ring:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.story-label { font-size: .65rem; color: var(--text-muted); margin-top: 4px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Story Viewer ── */
.story-reaction-btn {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px; padding: 5px 14px; color: #fff; font-size: .82rem;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    transition: var(--trans);
}
.story-reaction-btn:hover { background: rgba(255,255,255,.2); }
.story-reaction-btn.active { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.5); font-weight: 700; }

/* ══════════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════════ */
.main-content {
    min-height: calc(100vh - var(--navbar-h) - 56px);
    padding: 28px 0 48px;
}

/* ══════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════ */
.card-pro {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
    overflow: hidden;
}

.card-pro:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
    transform: translateY(-2px);
}

.card-pro-body { padding: 24px; }
.card-pro-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-pro-header-title {
    font-size: .95rem; font-weight: 700; color: var(--text); margin: 0;
}
.card-pro-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
}

/* Dashboard banner */
.dashboard-banner {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dashboard-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--purple));
}

.banner-title {
    font-weight: 800;
    font-size: 1.9rem;
    letter-spacing: -.03em;
    margin-bottom: 10px;
    color: var(--text);
}

.banner-desc {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 520px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ── Legacy card aliases ── */
.card-custom {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--trans);
}
.card-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}
.card-body-custom { padding: 28px; }

.card-icon-wrapper {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════ */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: .9rem;
    color: var(--text);
    background: #fff;
    transition: var(--trans);
    font-family: inherit;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

.form-control::placeholder { color: var(--text-light); }

.form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--trans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .875rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,86,219,.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(26,86,219,.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary-border);
}
.btn-outline-primary:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-secondary {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-secondary:hover { background: #eef2f7; border-color: var(--border-dark); color: var(--text); }

.btn-outline-danger:hover { transform: translateY(-1px); }

/* Size variants */
.btn-sm { font-size: .8rem; padding: 5px 12px; }
.btn-lg { font-size: .95rem; padding: 12px 22px; }
.btn-xl { font-size: 1rem; padding: 14px 28px; border-radius: var(--radius-lg); }

/* Legacy alias */
.btn-custom-sm { font-size: .82rem; padding: 6px 14px; font-weight: 600; }

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */
.table-pro {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table-pro thead th {
    background: var(--bg-subtle);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-pro tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: .875rem;
    color: var(--text);
    vertical-align: middle;
}

.table-pro tbody tr:last-child td { border-bottom: none; }
.table-pro tbody tr:hover td { background: #fafbff; }

/* ══════════════════════════════════════════════════
   BADGES & STATUS
══════════════════════════════════════════════════ */
.badge-pro {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}

.badge-green  { background: var(--green-soft);  color: var(--green);  }
.badge-red    { background: var(--red-soft);    color: var(--red);    }
.badge-amber  { background: var(--amber-soft);  color: var(--amber);  }
.badge-blue   { background: var(--primary-soft); color: var(--primary); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }

/* ══════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════ */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--trans);
    box-shadow: var(--shadow-xs);
}

.stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.stat-icon {
    width: 42px; height: 42px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}

.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ══════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════ */
.page-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
    letter-spacing: -.02em;
}

.page-subtitle { color: var(--text-muted); font-size: .875rem; margin: 0; }

/* ══════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════ */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    padding: 16px 22px;
}

.modal-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-subtle); }

/* ══════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════ */
.alert {
    border-radius: var(--radius);
    border: none;
    font-size: .875rem;
    font-weight: 500;
}

.alert-success { background: var(--green-soft); color: #065f46; }
.alert-danger  { background: var(--red-soft);   color: #991b1b; }
.alert-warning { background: var(--amber-soft);  color: #92400e; }
.alert-info    { background: var(--indigo-soft); color: var(--indigo); }

/* ══════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════ */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 16px 0;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-logo { height: 22px; width: auto; opacity: .7; }
.footer-copy { font-size: .78rem; color: var(--text-light); }

/* ══════════════════════════════════════════════════
   UTILITY HELPERS
══════════════════════════════════════════════════ */
.section-divider {
    height: 1px; background: var(--border); margin: 24px 0;
}

.avatar-circle {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; flex-shrink: 0;
}

.text-primary-custom { color: var(--primary) !important; }
.bg-primary-soft { background: var(--primary-soft) !important; }
.bg-green-soft   { background: var(--green-soft)   !important; }
.bg-red-soft     { background: var(--red-soft)     !important; }
.bg-amber-soft   { background: var(--amber-soft)   !important; }
.bg-purple-soft  { background: var(--purple-soft)  !important; }
.bg-indigo-soft  { background: var(--indigo-soft)  !important; }

.text-green  { color: var(--green)   !important; }
.text-red    { color: var(--red)     !important; }
.text-amber  { color: var(--amber)   !important; }
.text-purple { color: var(--purple)  !important; }
.text-indigo { color: var(--indigo)  !important; }
.text-blue   { color: var(--primary) !important; }

.bg-blue-soft { background: var(--primary-soft) !important; }
.bg-warning-soft { background: var(--amber-soft) !important; }
.text-warning { color: var(--amber) !important; }

/* ══════════════════════════════════════════════════
   RESPONSIVE TWEAKS
══════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .dashboard-banner { padding: 24px 20px; }
    .banner-title { font-size: 1.4rem; }
    .card-pro-body { padding: 16px; }
    .main-content { padding: 16px 0 40px; }
    .page-title { font-size: 1.15rem; }
    .stat-value { font-size: 1.25rem; }
}

@media (max-width: 575px) {
    .btn-xl { font-size: .9rem; padding: 12px 20px; }
    .banner-title { font-size: 1.2rem; }
}

/* ══════════════════════════════════════════════════
   PULSE ANIMATION (used in legacy .logo-dot)
══════════════════════════════════════════════════ */
.logo-dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%; display: inline-block;
    box-shadow: 0 0 6px var(--primary);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%   { transform: scale(.9); opacity: .8; }
    50%  { transform: scale(1.15); opacity: 1; box-shadow: 0 0 10px var(--primary); }
    100% { transform: scale(.9); opacity: .8; }
}

/* Legacy nav aliases kept for backward compat */
.bg-blur { background: #fff !important; }
.nav-link-custom {
    font-weight: 500; font-size: .875rem;
    color: var(--text-muted) !important;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm);
    transition: var(--trans);
}
.nav-link-custom:hover { color: var(--text) !important; background: var(--bg-subtle); }
.nav-user-info { font-size: .82rem; color: var(--text-muted); }

/* ── Video Grid Responsive ── */
@media (max-width: 768px) {
    .video-call-wrapper {
        height: 70vh !important;
        border-radius: 16px !important;
    }
    .video-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(2, 1fr) !important;
        overflow: hidden !important;
        height: 100% !important;
        padding: 6px !important;
        gap: 6px !important;
    }
    .video-card {
        aspect-ratio: unset !important;
        height: 100% !important;
        width: 100% !important;
    }
}
