/* ==================================================================
   CARDIX - ANA STİL DOSYASI BY ABDURLAHMAN NAHHAS +905352202668
   ==================================================================

   İÇİNDEKİLER:
   
   01. CSS VARIABLES (ROOT) ................. Değişkenler
   02. RESET & BASE ......................... Temel sıfırlama
   03. TYPOGRAPHY ........................... Tipografi
   04. LAYOUT ............................... Genel yerleşim
   05. TOP BAR (ADMIN) ...................... Admin üst çubuğu
   06. TOPBAR (CLIENT) ...................... Client üst çubuğu
   07. BRAND ................................ Logo ve marka
   08. LOGIN ................................ Giriş ekranı
   09. CARDS ................................ Kartlar
   10. TABS ................................. Sekmeler
   11. FORMS ................................ Form elemanları
   12. BUTTONS .............................. Butonlar
   13. ALERTS & OVERLAYS .................... Uyarılar ve kaplamalar
   14. TABLES ............................... Tablolar
   15. BADGES ............................... Rozetler
   16. GRIDS ................................ Izgara sistemleri
   17. EDITOR LAYOUT ........................ Editor düzeni
   18. LOGOS ................................ Logo kartları
   19. TEMPLATE CARDS ....................... Şablon kartları
   20. CLIENT MISC .......................... Client yardımcılar
   21. FOOTER ............................... Alt bilgi
   22. RESPONSIVE TYPOGRAPHY ................ Duyarlı tipografi
   23. ANIMATIONS ........................... Animasyonlar
EK ALANLAR GELDİ

================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');


/* ============================================================
   1. CSS VARIABLES (ROOT)
   ============================================================ */
:root {
    --primary:              #d20808;
    --primary-dark:         #787878;
    --primary-light:        #818cf8;
    --secondary:            #d20808;
    --success:              #10b981;
    --danger:               #ef4444;
    --warning:              #f59e0b;
    --info:                 #3b82f6;

    --bg:                   #f8f8f8;
    --bg-alt:               #ffffff;
    --surface:              #ffffff;
    --surface-hover:        #f8f8f8;

    --text-primary:         #1e293b;
    --text-secondary:       #64748b;
    --text-muted:           #94a3b8;
    --text-inverse:         #ffffff;

    --border:               #d6ddea;
    --border-light:         #e6ebf3;

    --shadow-sm:            0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow:               0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg:            0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm:            8px;
    --radius:               8px;
    --radius-lg:            8px;
    --radius-xl:            8px;
    --radius-full:          8px;

    --transition:           all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --cmk-system-color:     #3b82f6;
    --cmk-system-color-rgb: 59, 130, 246;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: "Inter", "Tajawal", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

button, input, select, textarea {
    font-family: "Inter", "Tajawal", sans-serif;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--cmk-system-color, var(--primary-dark));
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
.cmk-h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.3;
}

.cmk-h2 {
    margin: 0 0 24px 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.cmk-h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.cmk-h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cmk-muted {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.cmk-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Spacing helpers */
.cmk-mt    { margin-top: 16px; }
.cmk-mt-lg { margin-top: 24px; }
.cmk-mb    { margin-bottom: 16px; }
.cmk-mb-lg { margin-bottom: 24px; }

.cmk-sep {
    margin: 28px 0;
    border: none;
    border-top: 2px solid var(--border-light);
}

/* Utility text/bg colors */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-danger  { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-info    { background: var(--info); }


/* ============================================================
   4. LAYOUT
   ============================================================ */
.wrap {
    flex: 1 0 auto;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px;
    width: 100%;
}

.cmk-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 32px;
}

.center {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .cmk-wrap { padding: 16px 20px; }
    .wrap      { padding: 16px; }
}


/* ============================================================
   5. TOP BAR (Admin)
   ============================================================ */
.cmk-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(8px);
}

.cmk-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    max-width: 1440px;
    margin: 0 auto;
}

.cmk-top__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cmk-top__left h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.cmk-top__right {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .cmk-top__inner {
        padding: 14px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
}


/* ============================================================
   6. TOPBAR (Client)
   ============================================================ */
.topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-left  { display: flex; align-items: center; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
}


/* ============================================================
   7. BRAND
   ============================================================ */
.cmk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmk-brand__logo,
.cmk-brand__logo--fallback {
    width: 135px;
    height: 65px;
    object-fit: contain;
    display: block;
}

.cmk-brand__logo--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.cmk-brand__texts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmk-brand__title {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    color: #7f7f7f !important;
}

.cmk-brand__tagline {
    font-size: 10px;
    line-height: 1.2;
    color: #7f7f7f !important;
}

/* Client brand */
.brand-link {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.brand-link:hover { opacity: 0.85; }

.brand-logo {
    max-height: 85px;
    width: auto;
    display: block;
}

.brand-fallback {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .brand-logo     { max-height: 40px; }
    .brand-fallback { font-size: 20px; }
}


/* ============================================================
   8. LOGIN PAGE
   ============================================================ */
body.cmk-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cmk-login-box {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.5s ease;
}

.cmk-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.cmk-login .cmk-brand__texts { align-items: center; }

.cmk-login-title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
}

.cmk-login-muted {
    margin: 0 0 32px 0;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
}

.cmk-login-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fee2e2;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.cmk-login-form .cmk-label {
    margin-top: 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.cmk-login-form .cmk-input {
    padding: 14px 16px;
    font-size: 15px;
    height: auto;
}

.cmk-login-form .cmk-btn {
    margin-top: 24px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    height: auto;
}


/* ============================================================
   9. CARDS
   ============================================================ */
.cmk-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.cmk-card > * + * {
    margin-top: 24px;
}

.cmk-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border);
}

.cmk-subcard {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: var(--transition);
}

.cmk-subcard:hover {
    background: var(--surface);
    border-color: var(--border);
}

/* Client card */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--border);
}

/* Panel (client) */
.panel {
    width: 100%;
    max-width: 520px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.panel h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.panel .sub {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
    text-transform: uppercase;
}

.panel label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.panel input,
.panel select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--surface);
    transition: var(--transition);
    text-align: center;
    outline: none;
}

.panel input:focus,
.panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}


/* ============================================================
   10. TABS
   ============================================================ */
.cmk-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    background: var(--surface);
    padding: 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    width: fit-content;
    max-width: 100%;
}

.cmk-tab {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cmk-tab:hover {
    color: var(--primary);
    background: var(--surface-hover);
}

.cmk-tab.is-active {
    background: var(--cmk-system-color, var(--primary)) !important;
    color: white;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .cmk-tabs {
        width: 100%;
        justify-content: center;
        border-radius: var(--radius);
    }
    .cmk-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}


/* ============================================================
   11. FORMS
   ============================================================ */
.cmk-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.cmk-row--bottom { align-items: flex-end; }

.cmk-col {
    flex: 1;
    min-width: 200px;
}

.cmk-col--end {
    flex: 0 0 auto;
    min-width: auto;
    align-self: flex-end;
}

@media (max-width: 768px) {
    .cmk-col     { min-width: 100%; }
    .cmk-col--end { width: 100%; }
}

.cmk-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.cmk-label-small {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cmk-input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--surface);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.cmk-input:hover { border-color: var(--border); }

.cmk-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

.cmk-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.cmk-color {
    height: 44px;
    padding: 6px;
    cursor: pointer;
    border-radius:5px;
}

select.cmk-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 44px;
}

[dir="rtl"] select.cmk-input {
    background-position: left 12px center;
    padding-left: 44px;
    padding-right: 14px;
}

/* Form grid helpers */
.cmk-formgrid {
    display: grid;
    gap: 16px;
    align-items: end;
}

.cmk-formgrid--1 { grid-template-columns: 1fr 180px; }
.cmk-formgrid--2 { grid-template-columns: 1fr 1fr 180px; }
.cmk-formgrid--3 { grid-template-columns: 1fr 1fr 1fr 180px; }
.cmk-formgrid .cmk-action { width: 180px; }

@media (max-width: 992px) {
    .cmk-formgrid--1,
    .cmk-formgrid--2,
    .cmk-formgrid--3 { grid-template-columns: 1fr; }
    .cmk-formgrid .cmk-action { width: 100%; }
}

/* Event select */
.event-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 15px !important;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M8 12L12 16M12 16L16 12M12 16V8M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 20px !important;

    text-align: center;
    text-align-last: center;
    padding-left: 44px !important;
    padding-right: 44px !important;
}

html[dir="rtl"] .event-select {
    background-position: left 15px center !important;
}



/* ============================================================
   12. BUTTONS
   ============================================================ */
.cmk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    white-space: nowrap;
    box-shadow: none;
    text-decoration: none;
}

.cmk-btn:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
    background: var(--surface-hover);
}

.cmk-btn:active { transform: translateY(0); }

.cmk-btn--primary {
    background: var(--cmk-system-color, var(--primary)) !important;
    color: white;
    border: none;
    box-shadow: 0 6px 16px rgba(var(--cmk-system-color-rgb, 210,8,8), .18) !important;
}

.cmk-btn--primary:hover {
    filter: brightness(0.92);
    box-shadow: 0 8px 22px rgba(var(--cmk-system-color-rgb, 210,8,8), .22) !important;
    color: white;
}

.cmk-btn--ghost {
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: none;
}

.cmk-btn--ghost:hover {
    background: var(--surface-hover);
}

.cmk-btn--block {
    width: 100%;
    justify-content: center;
}

.cmk-btn--sm {
    height: auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* Client buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--cmk-system-color, #3b82f6);
    color: white;
    margin-top: 24px;
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover { background: #e5e7eb; }

.btn-sm    { padding: 6px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; text-align: center; }


/* ============================================================
   13. ALERTS & OVERLAYS
   ============================================================ */
.cmk-alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    animation: slideIn 0.3s ease;
}

.cmk-alert[hidden] { display: none !important; }

.cmk-alert--ok    { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.cmk-alert--error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.cmk-alert--info  { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

.cmk-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.cmk-overlay.is-on { display: flex; }

.cmk-overlay__box {
    background: var(--surface);
    padding: 20px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmk-overlay__box::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Rate limit (client) */
.rate-limit-message {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 1px solid #fee2e2;
}

.rate-limit-icon  { font-size: 48px; margin-bottom: 16px; }

.rate-limit-title {
    font-size: 24px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 12px;
}

.rate-limit-text {
    color: #4b5563;
    margin-bottom: 24px;
    line-height: 1.6;
}

.rate-limit-retry {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 12px;
    font-family: monospace;
    color: #1f2937;
    margin: 20px 0;
}

.rate-limit-button {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 12px 32px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.rate-limit-button:hover { background: #2563eb; }


/* ============================================================
   14. TABLES
   ============================================================ */
.cmk-table-wrap {
    margin-top: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: auto;
    background: var(--surface);
}

.cmk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cmk-table th {
    text-align: left;
    padding: 16px 20px;
    background: var(--surface-hover);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border-light);
}

[dir="rtl"] .cmk-table th { text-align: right; }

.cmk-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
    min-height: 105px;
}

.cmk-table tr:last-child td { border-bottom: none; }
.cmk-table tr:hover td     { background: var(--surface-hover); }

.cmk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}


/* ============================================================
   15. BADGES
   ============================================================ */
.cmk-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.cmk-badge--on   { background: #d1fae5; color: #065f46; }
.cmk-badge--off  { background: #f1f5f9; color: #475569; }
.cmk-badge--ar   { background: #dbeafe; color: #1e40af; }
.cmk-badge--en   { background: #dcfce7; color: #166534; }
.cmk-badge--logo { background: #fed7aa; color: #92400e; }


/* ============================================================
   16. GRIDS
   ============================================================ */
.cmk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.cmk-grid--4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cmk-grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cmk-grid--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.cmk-subgrid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: stretch;
}

.cmk-subgrid-2 > .cmk-subcard {
    align-self: stretch;
}

.cmk-subgrid-2 + .cmk-subcard,
.cmk-subcard + .cmk-subgrid-2 {
    margin-top: 24px;
}

/* Client grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

@media (max-width: 1200px) {
    .cmk-grid--4 { grid-template-columns: repeat(3, 1fr); }
    .cmk-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .cmk-grid--4  { grid-template-columns: repeat(2, 1fr); }
    .cmk-subgrid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .cmk-grid,
    .cmk-grid--4,
    .cmk-grid--3,
    .cmk-grid--2 { grid-template-columns: 1fr; }
}


/* ============================================================
   17. EDITOR LAYOUT
   ============================================================ */
.cmk-legend {
    margin: 16px 0 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cmk-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 700;
    font-size: 12px;
    box-shadow: var(--shadow-sm);
}

.cmk-pill--bg   { background: var(--secondary); }
.cmk-pill--ar   { background: var(--info); }
.cmk-pill--en   { background: var(--success); }
.cmk-pill--logo { background: var(--warning); }

.cmk-headrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.cmk-editorbuts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cmk-editor-layout {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.cmk-editor-canvas {
    flex: 2;
    min-width: 600px;
}

@media (max-width: 1200px) {
    .cmk-editor-canvas { min-width: 100%; }
}

.cmk-canvas-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.cmk-tpl-img {
    width: 100%;
    display: block;
    border-radius: var(--radius-lg);
}

.cmk-region-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.cmk-editor-panel {
    flex: 1;
    min-width: 360px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.cmk-block {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.cmk-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cmk-block__title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmk-grid4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.cmk-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.cmk-btnrow {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.cmk-save-status {
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
    color: var(--success);
}

.cmk-align-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0 8px;
}

.cmk-align-grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 8px 0 12px;
}

.cmk-align-note {
    margin-top: 12px;
    font-size: 12px;
    text-align: center;
}

/* ============================================================
   18. LOGOS
   ============================================================ */
.cmk-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .cmk-grid3 { grid-template-columns: 1fr; }
}

.cmk-logo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cmk-logo-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border);
    transform: translateY(-2px);
}

.cmk-logo-preview {
    margin: 16px 0;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    background: #cfcfcf;
    transition: var(--transition);
}

.cmk-logo-preview.is-empty { justify-content: center; }

.cmk-logo-preview:hover {
    border-color: var(--primary-light);
    background: white;
}

.cmk-logo-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: var(--radius);
    object-fit: contain;
}

.cmk-logo-inline {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cmk-logo-card form {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmk-logo-card form + form,
.cmk-logo-form--danger {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.cmk-logo-card input[type="file"].cmk-input {
    height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: #fff;
}

.cmk-logo-form { margin-top: 12px; }


/* ============================================================
   19. TEMPLATE CARDS
   ============================================================ */
.cmk-tpl-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.cmk-tpl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}

.cmk-tpl-media {
    background: var(--surface-hover);
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cmk-tpl-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.cmk-tpl-card:hover .cmk-tpl-media img { transform: scale(1.02); }

.cmk-tpl-actions {
    padding: 18px;
    background: white;
    border-top: 1px solid var(--border-light);
}

.cmk-tpl-actions .cmk-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.cmk-tpl-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: var(--transition);
}

.cmk-tpl-link:hover { opacity: 0.9; }


/* ============================================================
   20. CLIENT MISC
   ============================================================ */
.head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.head h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
}

.event-title {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 200px;
}

.event-title div:first-child {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.event-title div:last-child {
    font-weight: 800;
    font-size: 16px;
    color: var(--text-primary);
    margin-top: 4px;
}

.media {
    background: var(--surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.card:hover .media img { transform: scale(1.02); }

.actions {
    padding: 16px;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border-light);
}

.note {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 16px;
}

.mini-note {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* Social grid */
.cmk-socialgrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.cmk-socialaction { margin-top: 24px; }

@media (max-width: 992px) {
    .cmk-socialgrid { grid-template-columns: 1fr; }
}


/* ============================================================
   21. FOOTER
   ============================================================ */
.footer {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.footer div,
.footer center {
    text-align: center;
    width: 100%;
}

.footer a {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover { color: var(--primary); }

.footer > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .footer { padding: 20px 16px; font-size: 13px; }
}


/* ============================================================
   22. RESPONSIVE TYPOGRAPHY
   ============================================================ */
@media (max-width: 640px) {
    .cmk-h1   { font-size: 24px; }
    .cmk-h2   { font-size: 20px; }
    .cmk-h3   { font-size: 16px; }
    .cmk-card { padding: 20px; }
    .cmk-subcard { padding: 18px; }
}


/* ============================================================
   23. ANIMATIONS
   ============================================================ */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cmk-actions .cmk-btn {
    width: 100%;
}

.cmk-tpl-actions .cmk-actions {
    margin-top: 10px;
}

.cmk-tpl-media img {
    height: unset;
}

.cmk-pass {
    display: flex;
}

/* ============================================================
   DESIGN SETTINGS - STACK FORMS (Fonts / Text Colors / System Color)
   ============================================================ */

/* 3 kart üstten hizalı kalsın */
.cmk-grid3--top { align-items: start; }

/* Bu özel formlarda: field(ler) üstte, buton altta */
.cmk-formstack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.cmk-formstack__fields {
  display: grid;
  gap: 16px;
  align-items: start;
}

/* Fonts ve System Color: tek kolon */
.cmk-formstack__fields--1 { grid-template-columns: 1fr; }

/* Text Colors: iki kolon aynı satır */
.cmk-formstack__fields--2 { grid-template-columns: 1fr 1fr; }

/* Button her zaman altta */
.cmk-formstack .cmk-action { margin-top: auto; }

/* Mobilde zaten 2 kolon alt alta gelsin */
@media (max-width: 768px) {
  .cmk-formstack__fields--2 { grid-template-columns: 1fr; }
}

/* Büyük color picker gerekiyorsa */
.cmk-color--lg { height: 50px; }


.cmk-field-full {
    width: 100%;
    margin-bottom: 16px;
}

.required-star {
    color: #e53e3e;
    margin-left: 4px;
}

.data-collect-fields input {
    width: 100%;
}

/* ============================================================
   SETTINGS - 2 COL GRID + NOTICE + CHECKLIST
   ============================================================ */

.cmk-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.cmk-grid2--top { align-items: start; }

@media (max-width: 980px) {
  .cmk-grid2 { grid-template-columns: 1fr; }
}

.cmk-hidden { display: none !important; }

/* checklist: alt alta */
.cmk-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* (Eğer önceki mesajdaki cmk-formstack css'i yoksa, bunu da ekle) */
.cmk-formstack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.cmk-formstack__fields {
  display: grid;
  gap: 16px;
  align-items: start;
}
.cmk-formstack__fields--1 { grid-template-columns: 1fr; }
.cmk-formstack .cmk-action { margin-top: auto; }

textarea.cmk-input {
  min-height: 120px;
  resize: vertical;
}

/* Enable satırı tek hizalı */
.cmk-field--inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.cmk-field--inline .cmk-label {
  margin-bottom: 0;
}

/* CARDIX APP SPLASH */
.cx-splash{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg,#ff5a1f 0%,#ff7b00 100%);
  opacity: 0;
  transition: opacity .35s ease;
}

.cx-splash.is-active{
  display: flex;
  opacity: 1;
}

.cx-splash__logo{
  width: min(380px, 70vw);
  animation: cxPulse 1.1s ease-in-out infinite;
}

@keyframes cxPulse{
  0%{transform:scale(1);}
  35%{transform:scale(1.1);}
  60%{transform:scale(1);}
  85%{transform:scale(1.07);}
  100%{transform:scale(1);}
}

.cx-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0,0,0,.82);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 999999;
}
.cx-toast.is-show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}



.cmk-pwa-iconpreview{
  width:72px;height:72px;border-radius:16px;
  border:1px dashed var(--border);
  background:rgba(255,255,255,.04);
}

.cmk-pwa-splashpreview{
  position:relative;
  border-radius:14px;
  border:1px dashed var(--border);
  background:linear-gradient(135deg,#ff5a1f 0%,#ff7b00 100%);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.cmk-pwa-splashpreview__logo{
  width:110px;height:44px;border-radius:10px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.22);
}
.cmk-pwa-splashpreview__powered{
  position:absolute;left:50%;bottom:10px;transform:translateX(-50%);
  text-align:center;font-size:10.5px;line-height:1.2;
  color:rgba(255,255,255,.92);opacity:.85;
}
.cmk-pwa-splashpreview__powered span{display:block;font-size:10px;opacity:.85;margin-top:2px}

.cmk-pwa-splashpreview {
    height: 175px;
}

.cmk-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.cmk-mini__box{border:1px solid var(--border);border-radius:10px;padding:12px;background:var(--surface-2);margin-bottom: 15PX;}
.cmk-mini__title{font-weight:600;margin-bottom:8px}
.cmk-mini__note{margin-top:8px;font-size:12px}
.cmk-divider{height:1px;background:var(--border);margin:18px 0}
.pwamobile .cmk-row {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: flex-start;
}

/* =========================
   CMK WYSIWYG (Login Notice)
========================= */
.cmk-wysiwyg{
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}

.cmk-wysiwyg__bar{
  display:flex;
  gap:8px;
  align-items:center;
  padding:10px 10px;
  background:rgba(0,0,0,.04);
  border-bottom:1px solid rgba(0,0,0,.08);
}

.cmk-wysiwyg[dir="rtl"] .cmk-wysiwyg__bar{
  flex-direction:row-reverse;
}

.cmk-wysiwyg__btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  color:#111;
  border-radius:10px;
  padding:7px 10px;
  font-weight:800;
  font-size:13px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
}

.cmk-wysiwyg__btn:hover{
  background:rgba(0,0,0,.03);
}

.cmk-wysiwyg__btn.is-active{
  background:rgba(0,0,0,.06);
  border-color:rgba(0,0,0,.18);
}

.cmk-wysiwyg__sep{
  width:1px;
  height:26px;
  background:rgba(0,0,0,.12);
  margin:0 2px;
}

.cmk-wysiwyg__editor{
  min-height:130px;
  padding:14px 14px;
  outline:none;
  font-size:14px;
  line-height:1.65;
}

.cmk-wysiwyg__editor:empty:before{
  content: attr(data-placeholder);
  opacity:.45;
}

.cmk-wysiwyg__ta{
  display:none !important; /* alttaki çirkin textarea problemi biter */
}

.cmk-wysiwyg__hint{
  padding:10px 12px;
  font-size:12px;
  color:rgba(0,0,0,.55);
  border-top:1px dashed rgba(0,0,0,.10);
  background:rgba(0,0,0,.015);
}