:root {
    --accent: #4f46e5;
    --accent-light: #eef2ff;
    --accent-hover: #4338ca;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --bg-subtle: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.07), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --danger: #ef4444;
    --success-bg: #ecfdf5;
    --success-text: #065f46;
    --success-border: #a7f3d0;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --error-border: #fecaca;
    --stat-views: #3b82f6;
    --stat-clicks: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

/* ======== LOGIN ======== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-page);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50vh;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    border-radius: 0 0 2rem 2rem;
}

.login-container { width: 100%; max-width: 420px; position: relative; z-index: 1; }

.login-box {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.login-header { text-align: center; margin-bottom: 2rem; }

.login-header h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-header p { color: var(--text-muted); font-size: 0.9rem; }

.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-subtle);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-group input::placeholder { color: var(--text-muted); }

.login-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
    min-height: 20px;
}

@media (max-width: 480px) {
    .login-box { padding: 2rem 1.5rem; }
    .login-header h1 { font-size: 1.3rem; }
    .login-page::before { height: 40vh; }
}

/* ======== DASHBOARD ======== */
.dashboard-page { min-height: 100vh; background: var(--bg-page); }

.dashboard-container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.35rem;
    color: #fff;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
    letter-spacing: -0.01em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.logout-button {
    padding: 0.5rem 1.1rem;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.logout-button:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

/* Post Grid */
.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

/* Post Card */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #7c3aed);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.post-card:hover::before { opacity: 1; }

.post-header h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.post-date { font-size: 0.8rem; color: var(--text-muted); display: block; }

.post-content { margin-bottom: 0.5rem; flex: 1; display: flex; flex-direction: column; }

.current-number {
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
}

.current-number label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.current-number span {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Forms */
.number-update-form { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }

.phone-input, .phone-input-arama, .phone-input-telegram {
    flex: 1;
    min-width: 180px;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.phone-input:focus, .phone-input-arama:focus, .phone-input-telegram:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.update-button {
    padding: 0.65rem 1.25rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.update-button:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.update-button:disabled { background: var(--text-muted); cursor: not-allowed; opacity: 0.6; }

.update-status { margin-top: 0.75rem; padding: 0.65rem 0.85rem; border-radius: var(--radius-xs); font-size: 0.85rem; display: none; }
.update-status.success { display: block; background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.update-status.error { display: block; background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); }

.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    border: 2px dashed var(--border);
}

.no-posts p { font-size: 1rem; }

/* ======== BULK UPDATE ======== */
.bulk-update-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.bulk-update-section h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.bulk-update-form { display: flex; gap: 0.85rem; align-items: flex-start; }

.bulk-input-group { flex: 1; }

.bulk-input-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.bulk-phone-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.bulk-phone-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.bulk-update-button {
    padding: 0.65rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.45rem;
    white-space: nowrap;
}

.bulk-update-button:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.bulk-update-button:disabled { background: var(--text-muted); cursor: not-allowed; opacity: 0.6; }

.bulk-update-status { margin-top: 0.75rem; padding: 0.65rem; border-radius: var(--radius-xs); font-size: 0.85rem; display: none; }

.phone-info { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }

/* ======== STATS OVERVIEW ======== */
.stats-overview {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
}

.stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-icon {
    opacity: 0.4;
}

.stat-icon-views { color: var(--stat-views); }
.stat-icon-clicks { color: var(--stat-clicks); }

.stat-card .stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-views { background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%); }
.stat-views::before { background: var(--stat-views); }
.stat-views .stat-value { color: #1e40af; }

.stat-clicks { background: linear-gradient(135deg, #f5f3ff 0%, #f8fafc 100%); }
.stat-clicks::before { background: var(--stat-clicks); }
.stat-clicks .stat-value { color: #5b21b6; }

.stats-period-toggle {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    background: var(--bg-subtle);
    border-radius: 2rem;
    padding: 0.2rem;
    border: 1px solid var(--border-light);
    width: fit-content;
}

.period-btn {
    padding: 0.35rem 0.9rem;
    border: none;
    border-radius: 2rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover { color: var(--text-secondary); }

.period-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stats-chart-container { position: relative; width: 100%; max-height: 250px; }

/* ======== POST CARD STATS ======== */
.post-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1rem; }

.post-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-xs);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.post-stat:hover { border-color: var(--border); }

.post-stat-svg {
    width: 18px;
    height: 18px;
    margin-bottom: 2px;
}

.stat-svg-views { color: var(--stat-views); }
.stat-svg-clicks { color: var(--stat-clicks); }

.post-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.post-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ======== SHOWCASE STATUS ======== */
.showcase-status {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-xs);
    border: 1.5px dashed var(--border);
    background: var(--bg-subtle);
}

.showcase-status.in-showcase {
    border-color: #22c55e;
    border-style: solid;
    background: #f0fdf4;
}

.showcase-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 0.5rem;
}

.showcase-badge svg { color: #22c55e; }

.showcase-date {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.75rem;
}

.showcase-remove-btn {
    padding: 0.35rem 0.85rem;
    background: transparent;
    color: var(--error-text);
    border: 1px solid var(--error-border);
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.showcase-remove-btn:hover:not(:disabled) {
    background: var(--error-bg);
}

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

.showcase-add-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.showcase-date-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
}

.showcase-date-input:focus {
    outline: none;
    border-color: var(--accent);
}

.showcase-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.showcase-add-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

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

@media (max-width: 768px) {
    .showcase-add-row { flex-direction: column; }
    .showcase-add-btn { width: 100%; justify-content: center; }
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
    .dashboard-container { padding: 1rem; }
    .dashboard-header { flex-direction: column; text-align: center; padding: 1.25rem 1rem; }
    .dashboard-header h1 { font-size: 1.15rem; }
    .bulk-update-form { flex-direction: column; }
    .bulk-update-button { width: 100%; margin-top: 0.75rem; }
    .posts-container { grid-template-columns: 1fr; }
    .number-update-form { flex-direction: column; flex-wrap: nowrap; }
    .phone-input { min-width: 100%; }
    .update-button { width: 100%; }
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.loading { animation: pulse 1.5s infinite; }

/* ======== NEW POST BUTTON ======== */
.new-post-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.new-post-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.back-button:hover { background: rgba(255,255,255,0.25); }

/* Post edit button */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.post-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.post-edit-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

/* ======== POST FORM ======== */
.post-form-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.form-section-title svg { color: var(--accent); opacity: 0.7; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }

.form-field-full { grid-column: 1 / -1; }

.form-field label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field textarea {
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-subtle);
    transition: all 0.2s ease;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

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

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Image upload */
.image-upload-area { margin-bottom: 0.25rem; }

.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.image-thumb {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg-subtle);
}

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

.image-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes spin { to { transform: rotate(360deg); } }

.image-upload-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.image-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.image-thumb:hover .image-remove-btn { opacity: 1; }

.image-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100px;
    height: 100px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 0.7rem;
    font-weight: 500;
}

.image-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* Vitrin görseli */
.vitrin-images-area {
    margin-bottom: 0.5rem;
}

.vitrin-images-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.vitrin-images-preview:empty {
    display: none;
}

.vitrin-thumb {
    position: relative;
    height: 120px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg-subtle);
}

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

.vitrin-thumb .image-remove-btn {
    opacity: 0;
}

.vitrin-thumb:hover .image-remove-btn {
    opacity: 1;
}

.vitrin-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vitrin-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 0.82rem;
    font-weight: 500;
}

.vitrin-upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

@media (max-width: 768px) {
    .vitrin-images-preview { grid-template-columns: repeat(4, 1fr); }
    .vitrin-thumb { height: 80px; }
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.form-cancel-btn {
    padding: 0.7rem 1.5rem;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-cancel-btn:hover { background: var(--border-light); }

.form-submit-btn {
    padding: 0.7rem 2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-submit-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.form-submit-btn:disabled { background: var(--text-muted); cursor: not-allowed; opacity: 0.6; }

/* Danger zone */
.danger-zone {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--error-border);
}

.danger-zone h3 {
    font-size: 0.95rem;
    color: var(--error-text);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.danger-zone p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.delete-post-btn {
    padding: 0.6rem 1.25rem;
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-post-btn:hover:not(:disabled) {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

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

@media (max-width: 768px) {
    .post-form-container { padding: 1.25rem; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
    .form-cancel-btn, .form-submit-btn { width: 100%; text-align: center; }
    .image-thumb, .image-add-btn { width: 80px; height: 80px; }
}

/* ======== ERROR PAGE ======== */
.error-container { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 200px); padding: 20px; }

.error-box {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border);
}

.error-box h2 { color: var(--danger); margin-bottom: 1rem; font-size: 1.25rem; font-weight: 600; }
.error-box .error-message { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }

.error-actions { display: flex; gap: 0.75rem; justify-content: center; }

.retry-button, .error-actions .login-button {
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.retry-button { background: var(--accent); color: white; }
.retry-button:hover { background: var(--accent-hover); transform: translateY(-1px); }

.error-actions .login-button { background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border); }
.error-actions .login-button:hover { background: var(--border-light); }

/* ======== ADMIN PANEL ======== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.admin-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.admin-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-top: 0.25rem;
}

.admin-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table thead { background: var(--bg-subtle); }

.admin-table th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.admin-table tbody tr:hover { background: var(--bg-subtle); }

.admin-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
}

.admin-btn:hover { background: var(--bg-subtle); }

.admin-btn-sm { padding: 0.2rem 0.55rem; font-size: 0.72rem; }

.admin-btn-success {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.admin-btn-success:hover { background: #dcfce7; }

.admin-btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.admin-btn-danger:hover { background: #fee2e2; }

@media (max-width: 768px) {
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-table { font-size: 0.78rem; }
    .admin-table th, .admin-table td { padding: 0.5rem 0.6rem; }
}

/* ======== ADMIN VITRIN YÖNETİMİ ======== */
.vitrin-stats-section {
    margin-top: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.vitrin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.vitrin-stat-card {
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

.vitrin-stat-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
}

.vitrin-stat-icon { font-size: 1.25rem; margin-bottom: 0.35rem; }

.vitrin-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.vitrin-stat-sub {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.vitrin-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-top: 0.15rem;
}

.vitrin-channels {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
}

.vitrin-channel {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
}

.vitrin-channel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.vitrin-channel-name { color: var(--text-muted); font-weight: 500; }
.vitrin-channel-val { font-weight: 700; color: var(--text-primary); }

.vitrin-section { margin-top: 1.5rem; }

.vitrin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.vitrin-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vitrin-count {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.vitrin-empty {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.vitrin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
}

.vitrin-ilan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    border-left: 3px solid #22c55e;
}

.vitrin-ilan-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.vitrin-ilan-info { display: flex; flex-direction: column; gap: 0.15rem; }

.vitrin-ilan-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.vitrin-ilan-owner {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.vitrin-ilan-badge { display: flex; align-items: center; gap: 0.35rem; }

.vitrin-ilan-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.vitrin-ilan-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.vitrin-ilan-stat { text-align: center; }

.vitrin-ilan-stat-val {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.vitrin-ilan-stat-lbl {
    display: block;
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.vitrin-ilan-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .vitrin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .vitrin-channels { flex-wrap: wrap; gap: 0.75rem; }
    .vitrin-cards { grid-template-columns: 1fr; }
    .vitrin-ilan-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Owner Badge */
.owner-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
