@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --zetamed-navy: #0D1B2A;
    --zetamed-light-navy: #1A2E44;
    --zetamed-lightest-navy: #243B55;
    --zetamed-slate: #94A3B8;
    --zetamed-light-slate: #64748B;
    --zetamed-white: #E2E8F0;
    --zetamed-green: #00A878;
    --zetamed-verified: #16A29A;
    --zetamed-brand: #16A29A;
    --zetamed-brand-hover: #1BBDB4;
    --zetamed-border: #1E3A52;
}

/* Global Reset for Plugin Areas */
.zetamed-wrap {
    font-family: 'Outfit', sans-serif;
    color: var(--zetamed-slate);
    background-color: var(--zetamed-navy);
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.6;
}

.zetamed-wrap *,
.zetamed-wrap *::before,
.zetamed-wrap *::after {
    box-sizing: border-box;
}

/* Header */
.zetamed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: rgba(10, 25, 47, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--zetamed-light-navy);
}

.zetamed-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--zetamed-green);
    letter-spacing: 1px;
}

.zetamed-nav {
    display: flex;
    gap: 30px;
}

.zetamed-nav a {
    color: var(--zetamed-light-slate);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.zetamed-nav a:hover {
    color: var(--zetamed-green);
}

.zetamed-auth {
    display: flex;
    gap: 20px;
    align-items: center;
}

.zetamed-btn-text {
    color: var(--zetamed-white);
    text-decoration: none;
    font-weight: 500;
}

/* Buttons */
.zetamed-btn {
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
}

.zetamed-btn-primary {
    background-color: transparent;
    color: var(--zetamed-green);
    border: 1px solid var(--zetamed-green);
}

.zetamed-btn-primary:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.zetamed-btn-outline {
    background-color: transparent;
    color: var(--zetamed-white);
    border: 1px solid var(--zetamed-white);
}

.zetamed-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.zetamed-hero {
    padding: 80px 20px;
    text-align: center;
    background: radial-gradient(circle at top, var(--zetamed-light-navy) 0%, var(--zetamed-navy) 100%);
}

.zetamed-hero h1 {
    font-size: 48px;
    color: var(--zetamed-white);
    margin-bottom: 20px;
}

.zetamed-subtitle {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.zetamed-disclaimer {
    background: rgba(100, 255, 218, 0.1);
    color: var(--zetamed-green);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 60px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

/* Entrance Cards */
.zetamed-entrances {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.zetamed-entrance-card {
    background-color: var(--zetamed-light-navy);
    padding: 40px;
    border-radius: 8px;
    flex: 1;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.zetamed-entrance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--zetamed-green);
}

.zetamed-entrance-card h2 {
    color: var(--zetamed-white);
    margin-top: 0;
}

/* Map Section */
.zetamed-map-section {
    padding: 60px 20px;
    text-align: center;
}

#turkey-map-container {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    background: var(--zetamed-light-navy);
    border-radius: 12px;
    padding: 20px;
}

.map-region {
    fill: var(--zetamed-lightest-navy);
    stroke: var(--zetamed-navy);
    stroke-width: 2;
    transition: fill 0.3s;
    cursor: pointer;
}

.map-region:hover {
    fill: var(--zetamed-green);
}

.zetamed-map-tooltip {
    position: absolute;
    background: rgba(17, 34, 64, 0.95);
    border: 1px solid var(--zetamed-green);
    padding: 15px;
    border-radius: 4px;
    color: var(--zetamed-white);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    text-align: left;
    min-width: 150px;
}

.tooltip-stat {
    font-size: 14px;
    color: var(--zetamed-slate);
    margin-top: 5px;
}

.tooltip-stat span {
    color: var(--zetamed-green);
    font-weight: bold;
}

/* Dashboard Styles */
.zetamed-dashboard {
    display: flex;
    min-height: 100vh;
}

.zetamed-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: var(--zetamed-light-navy);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--zetamed-border);
}

.zetamed-sidebar-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #6b7280;
    padding: 16px 15px 8px;
    margin-top: 4px;
}

.zetamed-profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--zetamed-lightest-navy);
    margin: 0 auto 20px;
    border: 2px solid var(--zetamed-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zetamed-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: var(--zetamed-slate);
    text-decoration: none;
    margin-bottom: 2px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.zetamed-menu-item span.fas,
.zetamed-menu-item span.far {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.zetamed-menu-item:hover {
    background-color: rgba(70, 95, 255, 0.08);
    color: var(--zetamed-white);
}

.zetamed-menu-item.active {
    background-color: var(--zetamed-brand);
    color: #ffffff;
}

    .zetamed-content {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        min-width: 0;
        overflow: visible;
    }

    .zetamed-content-inner {
        flex: 1;
        padding: 30px 40px;
        overflow: visible;
    }

.zetamed-content h2 {
    color: var(--zetamed-white);
    margin-top: 0;
    border-bottom: 1px solid var(--zetamed-light-navy);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

/* ============================
   Top Header Bar
   ============================ */
.zetamed-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 72px;
    min-height: 72px;
    background-color: var(--zetamed-light-navy);
    border-bottom: 1px solid var(--zetamed-border);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.zetamed-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.zetamed-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Circle Buttons (hamburger, dark toggle, notification) */
.zetamed-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--zetamed-border);
    background: transparent;
    color: var(--zetamed-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    font-size: 16px;
}

.zetamed-header-btn:hover {
    background: rgba(70, 95, 255, 0.08);
    color: var(--zetamed-white);
    border-color: rgba(70, 95, 255, 0.2);
}

/* Hamburger / Sidebar Toggle */
.zetamed-sidebar-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--zetamed-border);
    background: transparent;
    color: var(--zetamed-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 18px;
}

.zetamed-sidebar-toggle:hover {
    background: rgba(70, 95, 255, 0.08);
    color: var(--zetamed-white);
}

/* Notification Badge in Header */
@keyframes notif-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70%  { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.zetamed-header-btn .header-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
    border: 2px solid var(--zetamed-navy, #0f172a);
    animation: notif-pulse 2s ease-in-out infinite;
}

/* ============================
   User Profile Area in Header
   ============================ */
.zetamed-header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    border: 1px solid transparent;
}

.zetamed-header-profile:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--zetamed-border);
}

.zetamed-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--zetamed-lightest-navy);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(70, 95, 255, 0.3);
}

.zetamed-header-avatar .fas {
    font-size: 16px;
    color: var(--zetamed-slate);
}

.zetamed-header-username {
    color: var(--zetamed-white);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.zetamed-header-chevron {
    color: var(--zetamed-slate);
    font-size: 10px;
    transition: transform 0.2s;
}

.zetamed-header-profile.open .zetamed-header-chevron {
    transform: rotate(180deg);
}

/* ============================
   Profile Dropdown Menu
   ============================ */
.zetamed-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--zetamed-light-navy);
    border: 1px solid var(--zetamed-border);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 10001;
    overflow: hidden;
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zetamed-profile-dropdown.show {
    display: block;
}

.zetamed-dropdown-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--zetamed-border);
}

.zetamed-dropdown-name {
    color: var(--zetamed-white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.zetamed-dropdown-email {
    color: var(--zetamed-slate);
    font-size: 12px;
}

.zetamed-dropdown-menu {
    padding: 6px;
}

.zetamed-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--zetamed-slate);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.zetamed-dropdown-item:hover {
    background: rgba(70, 95, 255, 0.08);
    color: var(--zetamed-white);
}

.zetamed-dropdown-item .fas,
.zetamed-dropdown-item .far {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.zetamed-dropdown-divider {
    height: 1px;
    background: var(--zetamed-border);
    margin: 4px 6px;
}

.zetamed-dropdown-item.signout {
    color: #ef4444;
}

.zetamed-dropdown-item.signout:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

/* ============================
   Sidebar Branding (Logo)
   ============================ */
.zetamed-sidebar-branding {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--zetamed-border);
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.zetamed-sidebar-logo {
    display: block;
    width: 100%;
    padding: 16px 20px;
}

.zetamed-sidebar-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 64px;
    min-height: 32px;
    object-fit: contain;
    object-position: left center;
}

.zetamed-sidebar-logo-text {
    display: none;
}

/* ============================
   Sidebar Collapse
   ============================ */
.zetamed-sidebar {
    transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
}

.zetamed-sidebar.collapsed {
    width: 80px;
    min-width: 80px;
    padding: 24px 10px;
    overflow: visible;
}

.zetamed-sidebar.collapsed nav {
    overflow: visible;
}

.zetamed-sidebar.collapsed .zetamed-sidebar-branding {
    padding: 0;
}

.zetamed-sidebar.collapsed .zetamed-sidebar-logo {
    padding: 10px;
    display: flex;
    justify-content: center;
}

.zetamed-sidebar.collapsed .zetamed-sidebar-logo img {
    width: 42px;
    height: 42px;
    max-height: 42px;
    min-height: unset;
    object-position: center center;
}

.zetamed-sidebar.collapsed .zetamed-sidebar-logo-text,
.zetamed-sidebar.collapsed .zetamed-sidebar-label,
.zetamed-sidebar.collapsed .zetamed-badge,
.zetamed-sidebar.collapsed #favorites-count {
    display: none;
}

/* Hide bare text in menu items using font-size:0, restore on icons */
.zetamed-sidebar.collapsed .zetamed-menu-item {
    font-size: 0;
    justify-content: center;
    padding: 11px 8px;
    position: relative;
    overflow: visible;
}

.zetamed-sidebar.collapsed .zetamed-menu-item span.fas,
.zetamed-sidebar.collapsed .zetamed-menu-item span.far {
    font-size: 18px;
}

/* Hover tooltip for collapsed sidebar */
.zetamed-sidebar.collapsed .zetamed-menu-item::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: var(--zetamed-light-navy);
    color: var(--zetamed-white);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10002;
    border: 1px solid var(--zetamed-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.zetamed-sidebar.collapsed .zetamed-menu-item:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.zetamed-sidebar.collapsed .zetamed-menu-item.active::after {
    background: var(--zetamed-brand);
    border-color: var(--zetamed-brand);
}

/* Dashboard Tabs */
.zetamed-tab-content h2 {
    margin-top: 0;
    color: var(--zetamed-white);
    border-bottom: 2px solid var(--zetamed-navy);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* View Toggle */
.zetamed-view-toggle {
    display: flex;
    gap: 5px;
}

.zetamed-view-toggle button {
    background: var(--zetamed-light-navy);
    border: 1px solid var(--zetamed-navy);
    color: var(--zetamed-slate);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zetamed-view-toggle button.active {
    background: var(--zetamed-green);
    color: var(--zetamed-navy);
    border-color: var(--zetamed-green);
}

/* Grid vs List View */
.zetamed-grid.view-list {
    grid-template-columns: 1fr !important;
}

.zetamed-grid.view-list .zetamed-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

.zetamed-grid.view-list .zetamed-card-image {
    width: 200px;
    height: 150px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.zetamed-grid.view-list .zetamed-card-content {
    flex-grow: 1;
}

.zetamed-grid.view-list .zetamed-card-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    min-width: 150px;
    border-left: 1px solid var(--zetamed-light-navy);
    padding-left: 20px;
    margin-left: 20px;
    height: 150px;
}

.zetamed-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 5px;
    margin-bottom: 5px;
}

.zetamed-badge.jci {
    background: #E1F5FE;
    color: #0277BD;
}

.zetamed-badge.exp {
    background: #E8F5E9;
    color: #2E7D32;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--zetamed-light-slate);
    font-size: 13px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--zetamed-light-navy);
    border: 1px solid var(--zetamed-lightest-navy);
    color: var(--zetamed-white);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--zetamed-brand);
    box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.15);
}

/* Chat System Styles */
.zetamed-chat-interface {
    height: 600px;
    display: flex;
    background: #e5ddd5;
    border-radius: 8px;
    overflow: hidden;
    color: #4a4a4a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.zetamed-chat-sidebar {
    width: 300px;
    background: #ffffff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.zetamed-chat-search {
    padding: 10px;
    background: #f6f6f6;
    border-bottom: 1px solid #ddd;
}

.zetamed-chat-search input {
    background: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    width: 100%;
}

.zetamed-conversation-list {
    flex: 1;
    overflow-y: auto;
}

.zetamed-conversation-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zetamed-conversation-item:hover {
    background: #f5f5f5;
}

.zetamed-conversation-item.active {
    background: #ebebeb;
}

.zetamed-chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #efe7dd;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    /* Subtle whatsapp-like pattern if available, using plain color mostly */
}

.zetamed-chat-header {
    padding: 10px 15px;
    background: #f0f2f5;
    border-bottom: 1px solid #d1d7db;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.zetamed-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zetamed-message-bubble {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14.2px;
    line-height: 19px;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.zetamed-message-bubble.me {
    align-self: flex-end;
    background: #d9fdd3;
    color: #111b21;
    border-top-right-radius: 0;
}

.zetamed-message-bubble.them {
    align-self: flex-start;
    background: #ffffff;
    color: #111b21;
    border-top-left-radius: 0;
}

.zetamed-message-time {
    font-size: 11px;
    color: #667781;
    text-align: right;
    margin-top: 2px;
    margin-bottom: -4px;
    margin-right: -4px;
}

.zetamed-chat-input-area {
    padding: 10px 15px;
    background: #f0f2f5;
    border-top: 1px solid #d1d7db;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zetamed-chat-input-area textarea {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: inherit;
    resize: none;
    height: 42px;
    outline: none;
}

/* Hide default theme footer credits (Proudly powered by WordPress) */
#footer {
    display: none !important;
}

/* ============================================================
   TailAdmin-Style Tables
   ============================================================ */

/* Table Container */
.zetamed-ta-table-wrap {
    background: var(--zetamed-light-navy);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--zetamed-border);
}

/* Base Table */
.zetamed-ta-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--zetamed-slate);
    font-size: 14px;
}

/* Header */
.zetamed-ta-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--zetamed-slate);
    border-bottom: 1px solid var(--zetamed-border);
    white-space: nowrap;
    background: transparent;
}

/* Body Rows */
.zetamed-ta-table tbody tr {
    border-bottom: 1px solid var(--zetamed-border);
    transition: background 0.15s ease;
}

.zetamed-ta-table tbody tr:last-child {
    border-bottom: none;
}

.zetamed-ta-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Body Cells */
.zetamed-ta-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--zetamed-light-slate);
    font-size: 14px;
}

/* Primary cell text (names, subjects) */
.zetamed-ta-table tbody td.ta-primary {
    color: var(--zetamed-white);
    font-weight: 500;
}

/* Secondary cell text (dates, muted info) */
.zetamed-ta-table tbody td.ta-secondary {
    color: var(--zetamed-slate);
    font-size: 13px;
}

/* ============================================================
   TailAdmin-Style Badges
   ============================================================ */
.zetamed-ta-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* Success — green */
.zetamed-ta-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Pending/Warning — amber */
.zetamed-ta-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* Danger/Error — red */
.zetamed-ta-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Info — blue */
.zetamed-ta-badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Neutral — gray */
.zetamed-ta-badge.neutral {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* ============================================================
   TailAdmin-Style Filter Row
   ============================================================ */
.zetamed-ta-table thead tr.ta-filter-row th {
    padding: 8px 16px;
    border-bottom: 1px solid var(--zetamed-border);
    background: rgba(0, 0, 0, 0.15);
    text-transform: none;
    letter-spacing: normal;
}

.zetamed-ta-table thead tr.ta-filter-row input,
.zetamed-ta-table thead tr.ta-filter-row select {
    width: 100%;
    padding: 7px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--zetamed-border);
    border-radius: 6px;
    color: var(--zetamed-light-slate);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.zetamed-ta-table thead tr.ta-filter-row input:focus,
.zetamed-ta-table thead tr.ta-filter-row select:focus {
    border-color: var(--zetamed-brand);
}

.zetamed-ta-table thead tr.ta-filter-row select option {
    background: var(--zetamed-navy);
    color: var(--zetamed-light-slate);
}

/* ============================================================
   TailAdmin-Style Action Buttons
   ============================================================ */
.zetamed-ta-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.zetamed-ta-actions .ta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    gap: 4px;
}

.zetamed-ta-actions .ta-btn-view {
    background: rgba(70, 95, 255, 0.15);
    color: var(--zetamed-brand);
}

.zetamed-ta-actions .ta-btn-view:hover {
    background: rgba(70, 95, 255, 0.3);
}

.zetamed-ta-actions .ta-btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.zetamed-ta-actions .ta-btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.zetamed-ta-actions .ta-btn-outline {
    background: transparent;
    border: 1px solid var(--zetamed-border);
    color: var(--zetamed-slate);
}

.zetamed-ta-actions .ta-btn-outline:hover {
    border-color: var(--zetamed-brand);
    color: var(--zetamed-brand);
}

/* Clear filter button */
.ta-btn-clear {
    padding: 5px 10px;
    font-size: 11px;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.ta-btn-clear:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Responsive overflow for TailAdmin tables */
.zetamed-ta-table-wrap.overflow-x {
    overflow-x: auto;
}

.zetamed-ta-table-wrap.overflow-x .zetamed-ta-table {
    min-width: 900px;
}

/* ============================================================
   COMPACT LEADS TABLE — fits all 9 columns on one screen
   Scoped only to .zetamed-leads-table so other tables
   (consultations, tickets, etc.) keep their original sizing.
   ============================================================ */
.zetamed-leads-table-wrap {
    overflow: auto;          /* zoom may push content slightly wider; allow scroll */
    width: 100%;
    --leads-zoom: 1;
}

.zetamed-leads-table {
    width: 100%;
    table-layout: fixed;
    font-size: calc(12px * var(--leads-zoom, 1));
}

/* Draggable column headers — handle appears only on hover, in the corner */
.zetamed-leads-table thead tr#leads-header-row th {
    cursor: move;
    transition: background 0.15s;
    position: relative;
}
.zetamed-leads-table thead tr#leads-header-row th:hover {
    background: rgba(70, 95, 255, 0.08);
}
.zetamed-leads-table thead tr#leads-header-row th::before {
    content: '⋮⋮';
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    color: rgba(148, 163, 184, 0);
    font-size: 9px;
    letter-spacing: -2px;
    line-height: 1;
    pointer-events: none;
    transition: color 0.15s;
}
.zetamed-leads-table thead tr#leads-header-row th:hover::before {
    color: rgba(148, 163, 184, 0.55);
}

.zetamed-leads-table thead th {
    padding: calc(8px * var(--leads-zoom, 1)) calc(6px * var(--leads-zoom, 1));
    font-size: calc(10px * var(--leads-zoom, 1));
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zetamed-leads-table thead tr.ta-filter-row th {
    padding: calc(6px * var(--leads-zoom, 1)) calc(4px * var(--leads-zoom, 1));
}

.zetamed-leads-table thead tr.ta-filter-row input,
.zetamed-leads-table thead tr.ta-filter-row select {
    padding: calc(5px * var(--leads-zoom, 1)) calc(6px * var(--leads-zoom, 1));
    font-size: calc(11px * var(--leads-zoom, 1));
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.zetamed-leads-table tbody td {
    padding: calc(8px * var(--leads-zoom, 1)) calc(6px * var(--leads-zoom, 1));
    font-size: calc(12px * var(--leads-zoom, 1));
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Per-column widths driven by data-col so they survive drag-reordering */
.zetamed-leads-table th[data-col="patient"],
.zetamed-leads-table td[data-col="patient"]       { width: 16%; }
.zetamed-leads-table th[data-col="date"],
.zetamed-leads-table td[data-col="date"]          { width: 8%;  white-space: nowrap; }
.zetamed-leads-table th[data-col="source"],
.zetamed-leads-table td[data-col="source"]        { width: 8%; }
.zetamed-leads-table th[data-col="treatments"],
.zetamed-leads-table td[data-col="treatments"]    { width: 12%; }
.zetamed-leads-table th[data-col="status"],
.zetamed-leads-table td[data-col="status"]        { width: 10%; }
.zetamed-leads-table th[data-col="actions"],
.zetamed-leads-table td[data-col="actions"]       { width: 10%; text-align: center; }
.zetamed-leads-table th[data-col="qualification"],
.zetamed-leads-table td[data-col="qualification"] { width: 9%;  text-align: center; }
.zetamed-leads-table th[data-col="offer"],
.zetamed-leads-table td[data-col="offer"]         { width: 6%;  text-align: center; }
.zetamed-leads-table th[data-col="manage"],
.zetamed-leads-table td[data-col="manage"]        { width: 21%; text-align: center; }

/* Smaller avatar — scales with zoom */
.zetamed-leads-table .ta-user-avatar {
    width: calc(28px * var(--leads-zoom, 1));
    height: calc(28px * var(--leads-zoom, 1));
    border-width: 1px;
}

.zetamed-leads-table .ta-user-cell { gap: calc(8px * var(--leads-zoom, 1)); }

.zetamed-leads-table .ta-user-name {
    font-size: calc(12px * var(--leads-zoom, 1));
    line-height: 1.2;
}

/* Compact action buttons in the Actions column */
.zetamed-leads-table .zetamed-ta-actions { gap: calc(3px * var(--leads-zoom, 1)); }

.zetamed-leads-table .zetamed-ta-actions .ta-btn {
    padding: calc(4px * var(--leads-zoom, 1)) calc(6px * var(--leads-zoom, 1)) !important;
    font-size: calc(10px * var(--leads-zoom, 1)) !important;
    min-width: 0;
}

/* Status / assign / any select */
.zetamed-leads-table td select {
    max-width: 100%;
    font-size: calc(10px * var(--leads-zoom, 1));
    padding: calc(3px * var(--leads-zoom, 1)) calc(4px * var(--leads-zoom, 1));
    box-sizing: border-box;
}

/* Badges */
.zetamed-leads-table .zetamed-ta-badge {
    font-size: calc(9px * var(--leads-zoom, 1)) !important;
    padding: calc(1px * var(--leads-zoom, 1)) calc(4px * var(--leads-zoom, 1)) !important;
}

/* Trash icon in the Manage column */
.zetamed-leads-table .ta-btn-delete {
    padding: calc(4px * var(--leads-zoom, 1)) calc(6px * var(--leads-zoom, 1));
    font-size: calc(11px * var(--leads-zoom, 1));
    flex-shrink: 0;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 5px;
    cursor: pointer;
}
.zetamed-leads-table .ta-btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
}

/* Manage cell layout — assign dropdown + delete button, never overlap */
.zetamed-leads-table td[data-col="manage"] > div {
    display: flex;
    gap: calc(6px * var(--leads-zoom, 1));
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: 0;
}
.zetamed-leads-table td[data-col="manage"] select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(140px * var(--leads-zoom, 1));
    text-overflow: ellipsis;
}

/* ── TailAdmin Basic Table 1: User cell with avatar ── */
.ta-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ta-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(100, 255, 218, 0.15);
    flex-shrink: 0;
}

.ta-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ta-user-name {
    color: var(--zetamed-white);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ta-user-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    font-size: 11px;
    color: var(--zetamed-slate);
}

/* ── Click Spark Canvas ── */
#click-spark-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM
   ============================================================
   Breakpoints:
     1024px — Tablet landscape / small desktop
      768px — Tablet portrait
      480px — Mobile
   ============================================================ */

/* ── Mobile sidebar overlay backdrop ── */
.zetamed-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.zetamed-sidebar-backdrop.show {
    display: block;
}

/* ========================================
   ≤ 1024px — Tablet landscape
   ======================================== */
@media (max-width: 1024px) {

    /* Auto-collapse sidebar */
    .zetamed-sidebar {
        width: 80px;
        min-width: 80px;
        padding: 24px 10px;
    }

    .zetamed-sidebar .zetamed-sidebar-branding {
        padding: 0;
    }

    .zetamed-sidebar .zetamed-sidebar-logo {
        padding: 10px;
        display: flex;
        justify-content: center;
    }

    .zetamed-sidebar .zetamed-sidebar-logo img {
        width: 42px;
        height: 42px;
        max-height: 42px;
        min-height: unset;
        object-position: center center;
    }

    .zetamed-sidebar .zetamed-sidebar-logo-text,
    .zetamed-sidebar .zetamed-sidebar-label,
    .zetamed-sidebar .zetamed-badge,
    .zetamed-sidebar #favorites-count {
        display: none;
    }

    .zetamed-sidebar .zetamed-menu-item {
        font-size: 0;
        justify-content: center;
        padding: 11px 8px;
    }

    .zetamed-sidebar .zetamed-menu-item span.fas,
    .zetamed-sidebar .zetamed-menu-item span.far {
        font-size: 18px;
    }

    /* Content area tighter padding */
    .zetamed-content-inner {
        padding: 24px 24px;
    }

    /* Chat sidebar narrower */
    .zetamed-chat-sidebar {
        width: 220px;
    }

    /* Header padding reduced */
    .zetamed-header {
        padding: 16px 24px;
    }

    .zetamed-nav {
        gap: 20px;
    }

    /* Hero smaller */
    .zetamed-hero h1 {
        font-size: 38px;
    }
}

/* ========================================
   ≤ 768px — Tablet portrait
   ======================================== */
@media (max-width: 768px) {

    /* ── Sidebar: off-canvas overlay ── */
    .zetamed-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        z-index: 9999;
        width: 280px;
        min-width: 280px;
        padding: 24px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    /* Restore hidden elements when sidebar is open on mobile */
    .zetamed-sidebar .zetamed-sidebar-logo-text,
    .zetamed-sidebar .zetamed-sidebar-label,
    .zetamed-sidebar .zetamed-badge,
    .zetamed-sidebar #favorites-count {
        display: revert;
    }

    .zetamed-sidebar .zetamed-sidebar-logo {
        padding: 14px 18px;
        display: block;
    }

    .zetamed-sidebar .zetamed-sidebar-logo img {
        width: 100%;
        height: auto;
        max-height: 56px;
        min-height: unset;
        object-position: left center;
    }

    .zetamed-sidebar .zetamed-menu-item {
        font-size: 14px;
        justify-content: flex-start;
        padding: 11px 14px;
    }

    .zetamed-sidebar .zetamed-menu-item span.fas,
    .zetamed-sidebar .zetamed-menu-item span.far {
        font-size: 15px;
    }

    /* Sidebar open state on mobile */
    .zetamed-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
    }

    /* ── Top Header compact ── */
    .zetamed-top-header {
        padding: 0 12px;
        height: 60px;
        min-height: 60px;
    }

    /* Hide username, keep avatar */
    .zetamed-header-username,
    .zetamed-header-chevron {
        display: none;
    }

    .zetamed-header-profile {
        padding: 4px;
    }

    /* Profile dropdown full-width on mobile */
    .zetamed-profile-dropdown {
        position: fixed;
        top: 62px;
        right: 8px;
        left: 8px;
        width: auto;
    }

    /* ── Content area ── */
    .zetamed-content-inner {
        padding: 20px 16px;
    }

    .zetamed-content h2 {
        font-size: 18px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    /* ── Chat: stack vertically ── */
    .zetamed-chat-interface {
        flex-direction: column;
        height: 500px;
    }

    .zetamed-chat-sidebar {
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .zetamed-chat-window {
        min-height: 0;
    }

    .zetamed-message-bubble {
        max-width: 85%;
    }

    /* ── Tables: horizontal scroll ── */
    .zetamed-ta-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .zetamed-ta-table-wrap .zetamed-ta-table {
        min-width: 700px;
    }

    /* ── Forms: single column ── */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ── Public Header (home/pricing) ── */
    .zetamed-header {
        padding: 14px 16px;
        gap: 12px;
    }

    .zetamed-nav {
        display: none;
    }

    .zetamed-logo {
        font-size: 20px;
    }

    /* ── Hero ── */
    .zetamed-hero {
        padding: 50px 16px;
    }

    .zetamed-hero h1 {
        font-size: 30px;
    }

    .zetamed-subtitle {
        font-size: 15px;
    }

    .zetamed-disclaimer {
        font-size: 12px;
        padding: 8px 14px;
        margin-bottom: 40px;
    }

    /* ── Entrance Cards ── */
    .zetamed-entrances {
        flex-direction: column;
        gap: 20px;
        max-width: 100%;
        padding: 0 16px;
    }

    .zetamed-entrance-card {
        padding: 24px;
    }

    /* ── Map section ── */
    #turkey-map-container {
        padding: 12px;
    }

    /* ── Grid/List View ── */
    .zetamed-grid.view-list .zetamed-card {
        flex-direction: column;
    }

    .zetamed-grid.view-list .zetamed-card-image {
        width: 100%;
        height: 180px;
    }

    .zetamed-grid.view-list .zetamed-card-actions {
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--zetamed-light-navy);
        padding-left: 0;
        padding-top: 16px;
        margin-left: 0;
        margin-top: 16px;
        min-width: auto;
        height: auto;
        width: 100%;
    }
}

/* ========================================
   ≤ 480px — Mobile
   ======================================== */
@media (max-width: 480px) {

    /* Sidebar narrower on very small screens */
    .zetamed-sidebar {
        width: 260px;
        min-width: 260px;
    }

    /* Top header ultra compact */
    .zetamed-top-header {
        padding: 0 8px;
        height: 56px;
        min-height: 56px;
    }

    .zetamed-header-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .zetamed-header-avatar {
        width: 34px;
        height: 34px;
    }

    /* Content even tighter */
    .zetamed-content-inner {
        padding: 16px 12px;
    }

    .zetamed-content h2 {
        font-size: 16px;
    }

    /* Chat reduced height */
    .zetamed-chat-interface {
        height: 400px;
    }

    .zetamed-chat-sidebar {
        height: 120px;
    }

    .zetamed-chat-messages {
        padding: 12px;
    }

    .zetamed-message-bubble {
        max-width: 90%;
        font-size: 13.5px;
    }

    /* Profile dropdown */
    .zetamed-profile-dropdown {
        top: 58px;
        right: 4px;
        left: 4px;
    }

    /* Hero ultra compact */
    .zetamed-hero h1 {
        font-size: 24px;
    }

    .zetamed-subtitle {
        font-size: 14px;
    }

    .zetamed-hero {
        padding: 36px 12px;
    }

    /* Table action buttons stack */
    .zetamed-ta-actions {
        flex-direction: column;
        gap: 4px;
    }

    .zetamed-ta-actions .ta-btn {
        width: 100%;
        justify-content: center;
    }

    /* Auth buttons tighter */
    .zetamed-auth {
        gap: 10px;
    }

    .zetamed-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ── Generic card classes ─────────────────────────────────────────────────── */
.zetamed-card {
    background: var(--zetamed-light-navy);
    border-radius: 12px;
    border: 1px solid var(--zetamed-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zetamed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ── Light mode global overrides ─────────────────────────────────────────── */
body.light-mode .zetamed-wrap {
    background-color: #f1f5f9;
    color: #334155;
}

body.light-mode .zetamed-sidebar {
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
}

body.light-mode .zetamed-content {
    background-color: #f1f5f9;
}

body.light-mode .zetamed-header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom-color: #e2e8f0;
}

body.light-mode .zetamed-menu-item {
    color: #475569;
}

body.light-mode .zetamed-menu-item:hover,
body.light-mode .zetamed-menu-item.active {
    background: rgba(0, 168, 120, 0.08);
    color: #00A878;
}

body.light-mode .zetamed-tab-content h2 {
    border-bottom-color: #e2e8f0;
}

body.light-mode .zetamed-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.light-mode .zetamed-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .zetamed-btn-outline {
    border-color: #cbd5e1;
    color: #334155;
}

body.light-mode .zetamed-btn-outline:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: #94a3b8;
}

/* ── Logo light / dark mode switching ───────────────────────── */
/* Default = dark mode: dark logo görünür, light logo gizli */
.zetamed-logo-dark  { display: block; }
.zetamed-logo-light { display: none;  }

/* Light mode aktif olduğunda swap */
body.light-mode .zetamed-logo-dark  { display: none;  }
body.light-mode .zetamed-logo-light { display: block; }

/* Sidebar: .zetamed-sidebar-logo img { display:block } kuralını geçersiz kıl (specificity 0,2,0 > 0,1,1) */
.zetamed-sidebar-logo .zetamed-logo-dark  { display: block; }
.zetamed-sidebar-logo .zetamed-logo-light { display: none;  }
body.light-mode .zetamed-sidebar-logo .zetamed-logo-dark  { display: none;  }
body.light-mode .zetamed-sidebar-logo .zetamed-logo-light { display: block; }