/* ================================================
   Cukur Panel - Dashboard Styles
   ================================================ */

:root {
    --ck-primary: #00897B;
    --ck-primary-hover: #00796B;
    --ck-primary-light: #E0F2F1;
    --ck-success: #16a34a;
    --ck-success-light: #f0fdf4;
    --ck-warning: #f59e0b;
    --ck-warning-light: #fffbeb;
    --ck-error: #dc2626;
    --ck-error-light: #fef2f2;
    --ck-purple: #7c3aed;
    --ck-purple-light: #f5f3ff;
    --ck-blue: #2563eb;
    --ck-blue-light: #eff6ff;
    --ck-text: #1f2937;
    --ck-text-secondary: #6b7280;
    --ck-text-muted: #9ca3af;
    --ck-bg: #f5f5f5;
    --ck-white: #ffffff;
    --ck-border: #e5e7eb;
    --ck-radius: 16px;
    --ck-radius-sm: 10px;
    --ck-shadow: 0 1px 3px rgba(0,0,0,0.04);
    --ck-shadow-md: 0 4px 12px rgba(0,0,0,0.06);
}

/* ---- Reset ---- */

/* Hide WP admin bar on panel pages */
#wpadminbar {
    display: none !important;
}
html.admin-bar {
    margin-top: 0 !important;
}

.ck-panel *, .ck-panel-login *,
.ck-panel *::before, .ck-panel-login *::before,
.ck-panel *::after, .ck-panel-login *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- Login ---- */

.ck-panel-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    direction: rtl;
    font-family: inherit;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.ck-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.ck-particles-container canvas {
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 768px) {
.ck-particles-container {
   display: none !important;
}
}

.ck-login-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 48px 36px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: ck-card-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ck-card-appear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ck-login-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ck-login-icon svg {
    stroke: rgba(255, 255, 255, 0.85);
}

.ck-login-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.ck-login-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 28px;
}

/* Login card scoped overrides for glass theme */
.ck-panel-login .ck-input {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.ck-panel-login .ck-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.ck-panel-login .ck-input:focus {
    border-color: var(--ck-primary);
    box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.ck-panel-login .ck-btn-primary {
    background: var(--ck-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.35);
}

.ck-panel-login .ck-btn-primary:hover {
    background: var(--ck-primary-hover);
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.45);
    transform: translateY(-1px);
}

.ck-panel-login .ck-btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.18);
}

.ck-panel-login .ck-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.ck-panel-login .ck-alert {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ck-panel-login .ck-alert-error {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.ck-panel-login .ck-alert-error a {
    color: #5eead4;
}

.ck-panel-login .ck-alert-success {
    background: rgba(22, 163, 74, 0.15);
    color: #86efac;
    border: 1px solid rgba(22, 163, 74, 0.3);
}

.ck-otp-footer {
    margin-top: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ck-panel-login .ck-link-btn {
    color: #5eead4;
}

.ck-link-btn {
    background: none;
    border: none;
    color: var(--ck-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 0;
}

.ck-link-btn:hover { text-decoration: underline; }

/* ---- Panel Layout ---- */

.ck-panel {
    display: flex;
    min-height: 100vh;
    background: var(--ck-bg);
    direction: rtl;
    font-family: inherit;
}

/* Sidebar */

.ck-sidebar {
    width: 260px;
    background: var(--ck-white);
    box-shadow: var(--ck-shadow);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
}

.ck-sidebar-profile {
    padding: 28px 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--ck-border);
}

.ck-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ck-primary-light);
    color: var(--ck-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.ck-profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ck-profile-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ck-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ck-profile-phone {
    font-size: 12px;
    color: var(--ck-text-muted);
}

.ck-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ck-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--ck-radius-sm);
    color: var(--ck-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: right;
    font-family: inherit;
}

.ck-nav-item:hover {
    background: var(--ck-bg);
    color: var(--ck-text);
}

.ck-nav-item.ck-active {
    background: var(--ck-primary-light);
    color: var(--ck-primary);
    font-weight: 600;
}

.ck-nav-icon {
    display: flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ck-nav-logout {
    margin: 8px 0px 16px;
    color: var(--ck-error);
}

.ck-nav-logout:hover {
    background: var(--ck-error-light);
    color: var(--ck-error);
}

/* Mobile Header */

.ck-mobile-header {
    display: none;
}

/* Content Area */

.ck-content {
    flex: 1;
    padding: 32px;
    min-width: 0;
}

/* ---- Common Components ---- */

.ck-page-title {
    margin-bottom: 24px;
}

.ck-page-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ck-text);
}

.ck-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ck-page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ck-text);
}

.ck-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ck-text);
    margin: 28px 0 16px;
}

/* Buttons */

.ck-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--ck-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.5;
}

.ck-btn-primary {
    background: var(--ck-primary);
    color: #fff;
}

.ck-btn-primary:hover {
    background: var(--ck-primary-hover);
    box-shadow: 0 4px 12px rgba(0,137,123,0.25);
}

.ck-btn-danger-outline {
    background: transparent;
    color: var(--ck-error);
    border: 1px solid var(--ck-error);
}

.ck-btn-danger-outline:hover {
    background: var(--ck-error-light);
}

.ck-btn-sm { padding: 7px 16px; font-size: 13px; }
.ck-btn-block { width: 100%; }

.ck-btn-outline {
    background: transparent;
    color: var(--ck-primary);
    border: 1.5px solid var(--ck-primary);
}

.ck-btn-outline:hover {
    background: rgba(0,137,123,0.06);
}

.ck-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Inputs */

.ck-form-group {
    margin-bottom: 18px;
}

.ck-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ck-text);
    margin-bottom: 6px;
}

.ck-input, .ck-select, .ck-textarea {
    width: 100%;
    height: 46px;
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius-sm);
    padding: 0 14px;
    font-size: 14px;
    color: var(--ck-text);
    background: #fafafa;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    -webkit-appearance: none;
}

.ck-select { cursor: pointer; }
.ck-select-sm { height: 38px; font-size: 13px; width: auto; min-width: 160px; }

.ck-textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.7;
}

.ck-input:focus, .ck-select:focus, .ck-textarea:focus {
    border-color: var(--ck-primary);
    box-shadow: 0 0 0 3px rgba(0,137,123,0.1);
    background: var(--ck-white);
}

.ck-input::placeholder, .ck-textarea::placeholder {
    color: var(--ck-text-muted);
}

.ck-ltr { direction: ltr; text-align: left; }

.ck-form-card {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 28px 24px;
    max-width: 560px;
}

/* Alerts */

.ck-alert {
    padding: 12px 16px;
    border-radius: var(--ck-radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.7;
}

.ck-alert-success {
    background: var(--ck-success-light);
    color: #15803d;
    border: 1px solid #dcfce7;
}

.ck-alert-error {
    background: var(--ck-error-light);
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.ck-alert-error a {
    color: var(--ck-primary);
    font-weight: 600;
    text-decoration: underline;
}

.ck-alert-warning {
    background: var(--ck-warning-light);
    color: #92400e;
    border: 1px solid #fef3c7;
}

.ck-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--ck-text-muted);
    font-size: 14px;
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
}

/* ---- Stats Grid ---- */

.ck-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ck-stat-card {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ck-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ck-stat-blue    { background: var(--ck-blue-light); color: var(--ck-blue); }
.ck-stat-orange  { background: var(--ck-warning-light); color: var(--ck-warning); }
.ck-stat-green   { background: var(--ck-success-light); color: var(--ck-success); }
.ck-stat-purple  { background: var(--ck-purple-light); color: var(--ck-purple); }

.ck-stat-info {
    display: flex;
    flex-direction: column;
}

.ck-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--ck-text);
    line-height: 1.2;
}

.ck-stat-label {
    font-size: 12px;
    color: var(--ck-text-muted);
    margin-top: 2px;
}

/* ---- Subscription Banner ---- */

.ck-sub-banner {
    border-radius: var(--ck-radius);
    padding: 18px 22px;
    margin-bottom: 24px;
}

.ck-sub-active {
    background: linear-gradient(135deg, #E0F2F1 0%, #B2DFDB 100%);
}

.ck-sub-inactive {
    background: var(--ck-warning-light);
    border: 1px solid #fef3c7;
}

.ck-sub-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--ck-text);
}

.ck-sub-badge {
    background: var(--ck-primary);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ---- Badges ---- */

.ck-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ck-badge-open     { background: var(--ck-warning-light); color: #92400e; }
.ck-badge-answered { background: var(--ck-success-light); color: #15803d; }
.ck-badge-closed   { background: #f3f4f6; color: #6b7280; }

/* ---- Ticket List ---- */

.ck-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ck-ticket-row {
    background: var(--ck-white);
    border-radius: var(--ck-radius-sm);
    box-shadow: var(--ck-shadow);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease;
}

.ck-ticket-row:hover {
    box-shadow: var(--ck-shadow-md);
    color: inherit;
}

.ck-ticket-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.ck-ticket-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--ck-text-muted);
    flex-shrink: 0;
}

.ck-ticket-subject {
    font-size: 14px;
    font-weight: 600;
    color: var(--ck-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ck-ticket-user {
    font-size: 12px;
    color: var(--ck-text-muted);
    flex-shrink: 0;
    direction: ltr;
}

.ck-ticket-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ck-ticket-dept {
    font-size: 12px;
    color: var(--ck-text-secondary);
}

.ck-ticket-date {
    font-size: 12px;
    color: var(--ck-text-muted);
    direction: ltr;
}

/* ---- Chat / Ticket View ---- */

.ck-ticket-info-bar {
    display: flex;
    gap: 20px;
    padding: 14px 20px;
    background: var(--ck-white);
    border-radius: var(--ck-radius-sm);
    box-shadow: var(--ck-shadow);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--ck-text-secondary);
    flex-wrap: wrap;
}

.ck-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.ck-chat-bubble {
    border-radius: var(--ck-radius);
    padding: 16px 20px;
    max-width: 85%;
}

.ck-bubble-user {
    background: var(--ck-white);
    box-shadow: var(--ck-shadow);
    align-self: flex-start;
}

.ck-bubble-staff {
    background: var(--ck-primary-light);
    align-self: flex-end;
}

.ck-bubble-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.ck-bubble-header strong {
    color: var(--ck-text);
}

.ck-staff-badge {
    background: var(--ck-primary);
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.ck-bubble-time {
    color: var(--ck-text-muted);
    font-size: 11px;
    margin-right: auto;
    direction: ltr;
}

.ck-bubble-body {
    font-size: 14px;
    color: var(--ck-text);
    line-height: 1.8;
}

.ck-reply-box {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 20px;
}

.ck-reply-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.ck-closed-notice {
    text-align: center;
    padding: 20px;
    color: var(--ck-text-muted);
    font-size: 14px;
    background: #f9fafb;
    border-radius: var(--ck-radius-sm);
}

/* ---- Services Grid ---- */

.ck-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ck-service-card {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 22px 20px;
}

.ck-service-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ck-text);
    margin-bottom: 12px;
}

.ck-service-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--ck-text-secondary);
}

/* ---- Subscription Plans ---- */

.ck-plans-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}
.ck-plans-grid::-webkit-scrollbar { display: none; }

.ck-plan-card {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 28px 24px;
    text-align: center;
    min-width: 240px;
    flex-shrink: 0;
}

.ck-plan-card h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ck-text);
    margin-bottom: 12px;
}

.ck-plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--ck-primary);
    margin-bottom: 16px;
}

.ck-plan-price small {
    font-size: 14px;
    font-weight: 500;
    color: var(--ck-text-secondary);
}

.ck-plan-features {
    list-style: none;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ck-plan-features li {
    font-size: 13px;
    color: var(--ck-text-secondary);
}

.ck-subs-active-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.ck-sub-card {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 24px;
    position: relative;
}

.ck-service-ticket {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ck-ticket-badge {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ck-sub-card-active {
    border: 2px solid var(--ck-primary);
}

.ck-sub-card-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--ck-primary);
    color: #fff;
    padding: 2px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ck-sub-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ck-text);
    margin-bottom: 6px;
}

.ck-sub-card p {
    font-size: 14px;
    color: var(--ck-text-secondary);
}

/* History */

.ck-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ck-history-row {
    background: var(--ck-white);
    border-radius: var(--ck-radius-sm);
    padding: 12px 18px;
    box-shadow: var(--ck-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--ck-text-secondary);
}

/* ---- Filters ---- */

.ck-filters {
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---- Mobile Responsive ---- */

@media (max-width: 768px) {
    .ck-sidebar {
        position: fixed;
        right: -280px;
        top: 0;
        height: 100vh;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .ck-sidebar.ck-sidebar-open {
        right: 0;
    }

    .ck-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px;
        background: var(--ck-white);
        box-shadow: var(--ck-shadow);
        position: sticky;
        top: 0;
        z-index: 99;
    }

    .ck-menu-btn {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--ck-text);
        padding: 4px;
    }

    .ck-mobile-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--ck-text);
    }

    .ck-avatar-sm {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: var(--ck-primary-light);
        color: var(--ck-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 14px;
    }

    .ck-panel {
        flex-direction: column;
    }

    .ck-content {
        padding: 20px 16px;
    }

    .ck-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ck-ticket-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }

    .ck-ticket-main {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ck-ticket-subject {
        white-space: normal;
        word-break: break-word;
    }

    .ck-ticket-meta {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ck-chat-bubble {
        max-width: 95%;
    }

    .ck-ticket-info-bar {
        flex-direction: column;
        gap: 8px;
    }

    .ck-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ck-reply-bottom {
        flex-direction: row;
        align-items: stretch;
    }

    .ck-reply-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ck-reply-actions .ck-btn {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 9px 12px;
    }
}

/* Mobile logout button in header */
.ck-mobile-logout-btn {
    display: none;
}

@media (max-width: 768px) {
    .ck-mobile-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--ck-error);
        padding: 4px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        transition: background 0.2s;
    }
    .ck-mobile-logout-btn:hover {
        background: var(--ck-error-light);
    }
}

@media (max-width: 480px) {
    .ck-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ck-stat-card {
        padding: 16px 14px;
    }

    .ck-stat-value {
        font-size: 20px;
    }

    .ck-plan-card {
        min-width: 200px;
    }

    .ck-reply-actions {
        flex-direction: row;
    }

    .ck-ticket-row {
        padding: 12px;
    }

    .ck-ticket-id {
        font-size: 12px;
    }

    .ck-ticket-subject {
        font-size: 13px;
    }

    .ck-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* Mobile overlay */
.ck-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

.ck-sidebar-overlay.ck-show {
    display: block;
}

/* ================================================
   FAQ Accordion
   ================================================ */

.ck-faq-section {
    display: none;
    margin-bottom: 20px;
}

.ck-faq-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--ck-primary-light);
    border-radius: var(--ck-radius-sm);
    margin-bottom: 10px;
    color: var(--ck-primary);
    font-weight: 600;
    font-size: 14px;
}

.ck-faq-header svg {
    flex-shrink: 0;
}

.ck-faq-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius-sm);
    overflow: hidden;
}

.ck-faq-item {
    background: var(--ck-white);
}

.ck-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    color: var(--ck-text);
    transition: background 0.2s;
}

.ck-faq-question:hover {
    background: #f9fafb;
}

.ck-faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--ck-text-muted);
}

.ck-faq-item.ck-faq-open .ck-faq-question svg {
    transform: rotate(180deg);
}

.ck-faq-answer {
    display: none;
    padding: 0 16px 16px 16px;
    font-size: 13px;
    color: var(--ck-text-secondary);
    line-height: 1.8;
}

.ck-faq-item.ck-faq-open .ck-faq-answer {
    display: block;
}

/* ================================================
   File Upload
   ================================================ */

.ck-file-upload-area {
    border: 2px dashed var(--ck-border);
    border-radius: var(--ck-radius-sm);
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.2s;
    cursor: pointer;
    position: relative;
}

.ck-file-upload-area:hover {
    border-color: var(--ck-primary);
}

.ck-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.ck-file-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ck-text-muted);
    font-size: 13px;
    pointer-events: none;
}

.ck-file-upload-placeholder svg {
    color: var(--ck-text-muted);
}

.ck-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ck-file-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ck-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--ck-text-secondary);
}

.ck-file-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-file-size {
    color: var(--ck-text-muted);
    font-size: 11px;
}

/* ================================================
   Ticket View - Sidebar Layout
   ================================================ */

.ck-ticket-view {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ck-ticket-chat-area {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) { 
.ck-ticket-chat-area {
    width: 100%;
  }
}

.ck-ticket-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.ck-ticket-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    margin-bottom: 16px;
}
.ck-ticket-chat-header h2 {
    font-size: 1rem !important;
}
.ck-ticket-chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ck-text);
    margin: 0;
}

.ck-ticket-sidebar-card {
    background: var(--ck-white);
    border-radius: var(--ck-radius);
    box-shadow: var(--ck-shadow);
    padding: 20px;
}

.ck-ticket-sidebar-card h3 {
    font-size: 1rem !important;
}

.ck-ticket-sidebar-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ck-text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ck-border);
}

.ck-ticket-sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.ck-ticket-sidebar-item + .ck-ticket-sidebar-item {
    border-top: 1px solid #f3f4f6;
}

.ck-sidebar-label {
    color: var(--ck-text-muted);
}

.ck-sidebar-value {
    color: var(--ck-text);
    font-weight: 500;
}

.ck-sidebar-highlight {
    background: var(--ck-primary-light);
    color: var(--ck-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

/* ---- Fullscreen Chat ---- */

.ck-chat-fullscreen {
    background: var(--ck-bg);
    border-radius: var(--ck-radius);
    padding: 24px 20px;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.ck-chat-fullscreen .ck-chat-bubble {
    max-width: 85%;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.9;
}

.ck-chat-fullscreen .ck-bubble-time {
    font-size: 11px;
}

/* ---- Bubble Attachments ---- */

.ck-bubble-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.ck-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    color: var(--ck-text-secondary);
    background: rgba(0,0,0,0.04);
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.ck-attachment-item:hover {
    background: rgba(0,0,0,0.08);
}

.ck-attachment-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.ck-attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---- Reply Bottom Bar ---- */

.ck-reply-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.ck-reply-file-wrap {
    flex-shrink: 0;
}

.ck-reply-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ck-radius-sm);
    background: var(--ck-bg);
    border: 1px solid var(--ck-border);
    cursor: pointer;
    color: var(--ck-text-secondary);
    transition: all 0.2s;
}

.ck-reply-file-btn:hover {
    background: var(--ck-primary-light);
    color: var(--ck-primary);
    border-color: var(--ck-primary);
}

/* ================================================
   Plan Categories & Descriptions
   ================================================ */

.ck-plan-category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ck-text);
    margin: 28px 0 14px 0;
    padding-right: 12px;
    border-right: 3px solid var(--ck-primary);
}

.ck-plan-category-title:first-child {
    margin-top: 0;
}

.ck-plan-description {
    font-size: 13px;
    color: var(--ck-text-secondary);
    line-height: 1.7;
    margin-top: 8px;
}

.ck-sub-days-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ck-success-light);
    color: var(--ck-success);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

/* ================================================
   Responsive - Ticket Sidebar
   ================================================ */

@media (max-width: 768px) {
    .ck-ticket-view {
        flex-direction: column-reverse;
    }

    .ck-ticket-sidebar {
        width: 100%;
        position: static;
        flex-direction: column;
    }

    .ck-ticket-sidebar-card {
        width: 100%;
    }

    .ck-chat-fullscreen {
        min-height: 300px;
        max-height: 450px;
        padding: 16px 12px;
    }

    .ck-chat-fullscreen .ck-chat-bubble {
        max-width: 95%;
    }
}

/* ================================================
   Banners & Announcement
   ================================================ */

.ck-banners {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.ck-banner {
    border-radius: var(--ck-radius);
    overflow: hidden;
    box-shadow: var(--ck-shadow);
}

.ck-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ck-banner a {
    display: block;
}

.ck-banner-lg {
    flex: 2;
    min-height: 140px;
}

.ck-banner-sm {
    flex: 1;
    min-height: 140px;
}

.ck-announcement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--ck-warning-light);
    border: 1px solid #fcd34d;
    border-radius: var(--ck-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
}

.ck-announcement svg {
    flex-shrink: 0;
    color: var(--ck-warning);
}

/* ================================================
   Badge: in_progress status
   ================================================ */

.ck-badge-in_progress {
    background: var(--ck-blue-light);
    color: var(--ck-blue);
}

/* ---- Warning outline button ---- */

.ck-btn-warning-outline {
    background: transparent;
    color: var(--ck-warning);
    border: 1px solid var(--ck-warning);
    border-radius: var(--ck-radius-sm);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ck-btn-warning-outline:hover {
    background: var(--ck-warning-light);
}

/* ---- Reply bottom alignment fix ---- */

.ck-reply-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.ck-reply-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.ck-reply-file-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ---- Banners responsive ---- */

@media (max-width: 768px) {
    .ck-banners {
        flex-direction: column;
    }

    .ck-banner-lg,
    .ck-banner-sm {
        flex: none;
        min-height: 100px;
    }
}

/* ---- Nav Badge ---- */

.ck-nav-item {
    position: relative;
}

.ck-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--ck-error);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-right: auto;
    margin-left: 0;
}

/* ---- Login Name Step ---- */

#ck-step-name {
    text-align: center;
}

#ck-step-name .ck-form-group {
    margin-bottom: 16px;
}

/* ---- Banner Slider ---- */

.ck-banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--ck-radius);
    margin-bottom: 24px;
}

.ck-slider-track {
    display: flex;
    direction: ltr;
}

.ck-slider-slide {
    min-width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    display: none;
}

.ck-slider-slide:first-child {
    display: block;
}

.ck-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--ck-radius);
}

.ck-banner-lg .ck-slider-slide {
    height: 139px;
}

.ck-banner-sm .ck-slider-slide {
    height: 100px;
}

.ck-slider-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.ck-slider-slide picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--ck-radius);
}

.ck-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    box-shadow: var(--ck-shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}

.ck-slider-arrow:hover {
    background: #fff;
}

.ck-slider-prev {
    right: 12px;
}

.ck-slider-next {
    left: 12px;
}

.ck-slider-prev svg,
.ck-slider-next svg {
    transform: rotate(180deg);
}

.ck-banner-slider .ck-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.ck-slider-dots .ck-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.ck-slider-dots .ck-dot.active {
    background: #fff;
}

/* ---- Plans Slider ---- */

.ck-plans-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.ck-plans-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ck-white);
    border: 1px solid var(--ck-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ck-shadow);
    transition: background 0.2s;
}

.ck-plans-arrow:hover {
    background: var(--ck-bg);
}

/* ---- Terms Link ---- */

.ck-terms-link {
    margin-top: 24px;
    text-align: center;
}

.ck-terms-link a {
    display: inline-block;
    font-size: 13px;
    color: var(--ck-primary);
    background: var(--ck-primary-light, #e0f2f1);
    padding: 8px 20px;
    border-radius: var(--ck-radius);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--ck-primary);
    transition: background 0.2s, color 0.2s;
}

.ck-terms-link a:hover {
    background: var(--ck-primary);
    color: #fff;
}

/* ---- Responsive additions ---- */

@media (max-width: 768px) {
    .ck-plans-arrow {
        display: none !important;
    }

    .ck-slider-arrow {
        width: 28px;
        height: 28px;
    }

    .ck-banner-lg .ck-slider-slide {
        height: 139px;
    }

    .ck-banner-sm .ck-slider-slide {
        height: 100px;
    }
}
