/* ============================================
   Klasör Etiketi Yazdırma Sistemi - CSS
   Gümüşhane Valiliği
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Condensed:wght@400;700&display=swap');

/* Jesaya 7 Font Ailesi */
@font-face {
    font-family: 'Jesaya7';
    src: url('fonts/02A167A1.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jesaya7';
    src: url('fonts/02A167A0.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jesaya7-Thin';
    src: url('fonts/02A167A5.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Ana Renkler - Koyu Gri/Turuncu */
    --primary: #27272a;
    /* Zinc 800 */
    --primary-dark: #18181b;
    /* Zinc 900 */
    --primary-light: #3f3f46;
    /* Zinc 700 */

    --secondary: #f97316;
    /* Daha canlı Turuncu */
    --secondary-light: #fb923c;

    /* Gradyan Renkleri (Varsayılan: Turuncu) */
    --gradient-start: #e67e22;
    --gradient-end: #f39c12;
    --border-color: #d35400;

    /* Nötr Renkler - Saf Koyu Gri */
    --bg-dark: #09090b;
    /* Zinc 950 */
    --bg-card: #18181b;
    /* Zinc 900 */
    --bg-input: #27272a;
    /* Zinc 800 */

    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Etiket Renkleri */
    --label-bg: #ffffff;
    --label-border: #cbd5e1;
    --label-header: #3a3a3a;
    --label-gold: #e67e22;

    /* Geçişler */
    --transition: all 0.3s ease;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Kırmızı Tema */
body.theme-red {
    --secondary: #ef4444;
    /* Red 500 */
    --secondary-light: #f87171;
    --gradient-start: #dc2626;
    /* Red 600 */
    --gradient-end: #ef4444;
    /* Red 500 */
    --border-color: #b91c1c;
    /* Red 700 */
}

/* Mavi Tema */
body.theme-blue {
    --secondary: #3b82f6;
    /* Blue 500 */
    --secondary-light: #60a5fa;
    --gradient-start: #2563eb;
    /* Blue 600 */
    --gradient-end: #3b82f6;
    /* Blue 500 */
    --border-color: #1d4ed8;
    /* Blue 700 */
}

/* Yeşil Tema */
body.theme-green {
    --secondary: #10b981;
    /* Emerald 500 */
    --secondary-light: #34d399;
    --gradient-start: #059669;
    /* Emerald 600 */
    --gradient-end: #10b981;
    /* Emerald 500 */
    --border-color: #047857;
    /* Emerald 700 */
}

/* Kahverengi Tema */
body.theme-brown {
    --secondary: #92400e;
    --secondary-light: #b45309;
    --gradient-start: #78350f;
    --gradient-end: #92400e;
    --border-color: #451a03;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--secondary);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-container {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-text p {
    font-size: 0.9rem;
    color: var(--secondary-light);
    font-weight: 500;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-container {
    max-width: 1600px;
    margin: 1rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

.card-header i {
    font-size: 1.1rem;
    color: var(--secondary);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 0.6rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 38px;
    max-height: 38px;
    resize: none;
    line-height: 1.4;
    overflow-y: hidden;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* Etiket Tipi Seçimi */
.label-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.type-btn {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    color: var(--text-muted);
    /* Varsayılan sönük metin */
}

.type-btn:hover {
    background: var(--primary-light);
    color: var(--text-primary);
}

.type-btn.active {
    border-color: var(--secondary);
    background: var(--secondary);
    /* Katı Turuncu */
    color: white;
    /* Aktifken beyaz metin */
}

.type-btn i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    display: block;
    color: var(--text-muted);
    /* İkon da varsayılan sönük */
    transition: var(--transition);
}

.type-btn.active i {
    color: white;
    /* Aktifken ikon da beyaz */
}

.type-btn span {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
}

.type-btn small {
    color: #a1a1aa;
    /* Daha belirgin gri */
    font-size: 0.7rem;
    /* Biraz daha büyük */
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

.type-btn.active small {
    color: rgba(255, 255, 255, 0.9);
    /* Aktifken neredeyse beyaz */
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(214, 158, 46, 0.4);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-group .btn {
    flex: 1;
}

/* ============================================
   ETİKET ÖNİZLEME
   ============================================ */
.preview-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-area {
    display: flex;
    align-items: center;
    /* Dikey ortala */
    justify-content: flex-start;
    /* Soldan başla */
    gap: 23px;

    background: white;
    border: 2px solid #94a3b8;
    border-radius: 4px;

    /* A4 Kağıt Temsili - Genişletilmiş */
    width: 100%;
    min-width: 660px;
    height: 480px;

    padding: 12px;
    /* Sol padding */
    padding-left: 18px;
    /* Soldan biraz daha it */
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap;
}

/* Etiket Listesi Kontrolleri */
.print-queue-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border-radius: 8px;
}

.print-queue-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.print-queue-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.print-queue-info strong {
    font-size: 1.1rem;
    color: var(--secondary);
}

.print-queue-buttons {
    display: flex;
    gap: 0.5rem;
}

.queue-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.queue-btn.add {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
}

.queue-btn.remove {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.queue-btn.clear {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.queue-btn:hover {
    transform: scale(1.1);
}

.queue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Kompakt etiket önizleme */
.label-preview.compact {
    transform: scale(0.95);
    transform-origin: top left;
    margin-right: -6px;
    flex-shrink: 0;
}

.label-preview.compact.dar {
    margin-right: -3px;
}


/* Etiket Stili */
.label-preview {
    background: var(--label-bg);
    border: 1.5px solid #94a3b8;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: var(--transition);
    flex-shrink: 0;
    /* Asla küçülme */
}

/* Etiket boyutları - önizleme için */
.label-preview.dar {
    width: 75px;
    height: 450px;
    flex-shrink: 0;
}

.label-preview.genis {
    width: 125px;
    height: 450px;
    flex-shrink: 0;
}

/* Logo Alanı */
.label-logo {
    background: linear-gradient(180deg, #3a3a3a 0%, #4a4a4a 100%);
    padding: 0.5rem 0.2rem;
    padding-bottom: 0.8rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.label-logo::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 12px;
    background: var(--gradient-start);
    /* Turuncu (Birim alanı rengi) */
    border-radius: 100% 100% 0 0 / 100% 100% 0 0;
    z-index: 10;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.label-logo img {
    width: 85px;
    /* Daha da büyütüldü */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.label-preview.dar .label-logo img {
    width: 55px;
}

/* Birim Bilgileri */
.label-birim {
    background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 0.4rem 0.2rem 0.5rem 0.2rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    /* Koyu çizgi */
    position: relative;
    z-index: 2;
}

.label-birim .birim-adi {
    font-family: 'Jesaya7', 'Roboto Condensed', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

/* Kod Bilgileri (Yan Yana) */
/* Kod Bilgileri (Bağımsız Badge) */
/* Kod Bilgileri (Satır + Badge) */
.label-codes-container {
    width: 100%;
    background: linear-gradient(180deg, #3a3a3a 0%, #4a4a4a 100%);
    /* Logo arkası ile aynı */
    padding: 4px 0;
    text-align: center;
    position: relative;
    z-index: 5;
    margin-bottom: 5px;
    /* Altına biraz boşluk */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.label-codes-inner-badge {
    display: inline-block;
    background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    /* Birim arkası ile aynı */
    color: white;
    padding: 1px 12px;
    border-radius: 12px;

    font-size: 0.55rem;
    line-height: 1.4;
    font-weight: 600;

    max-width: 95%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.label-codes-inner-badge .evrak-kodu {
    color: white;
    font-weight: 800;
}

.label-codes-inner-badge .kod-sep {
    color: rgba(255, 255, 255, 0.7);
    /* Hafif transparan ayraç */
    margin: 0 4px;
    font-weight: 800;
}

.label-codes-inner-badge .kod-numarasi {
    color: white;
    font-weight: 600;
}



/* Ana Başlık (Dikey) */
.label-baslik {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.15rem;
    background: white;
    position: relative;
    overflow: hidden;
}

/* Ana Başlık Metni */
.label-baslik-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: 'Jesaya7', 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    /* 1.1rem'den büyütüldü */
    color: #3a3a3a;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    line-height: 0.95;
    max-height: 100%;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
}

/* Yatay Başlık Stili */
.label-baslik-text.yatay {
    writing-mode: horizontal-tb;
    transform: none;
    white-space: normal;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Sola hizala */
    text-align: left;
    /* Metni sola dayalı yap */
    justify-content: flex-start;
    /* Üstten başla */
    height: 100%;
    width: 100%;
    padding: 1rem 0.2rem;
    line-height: 1.4;
    font-size: 0.7rem !important;
    /* Kesinlikle küçült */
}

.label-preview.dar .label-baslik-text.yatay {
    font-size: 0.6rem !important;
    /* Dar etiket için kesinlikle küçült */
    padding: 0.8rem 0.1rem;
}

.label-preview.dar .label-baslik-text {
    font-size: 0.95rem;
    /* 0.85rem'den büyütüldü */
}

.label-preview.genis .label-baslik-text {
    font-size: 1.1rem;
}

/* Alt Başlık */
.label-alt-baslik {
    position: absolute;
    left: 58%;
    top: 0;
    bottom: 0;
    margin: auto;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.75rem;
    /* 0.6rem'den büyütüldü */
    color: #64748b;
    text-align: center;
    max-height: 150px;
    height: 100%;
    overflow: hidden;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Yıl Alanı */
.label-yil {
    background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 0.15rem;
    text-align: center;
}

.label-yil-text {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-family: 'Jesaya7', 'Roboto Condensed', sans-serif;
    font-size: 0.8rem;
    /* 0.7rem'den büyütüldü */
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Dar etiket için yıl */
.label-preview.dar .label-yil {
    padding: 0.1rem;
}

.label-preview.dar .label-yil-text {
    font-size: 0.55rem;
    padding: 0.05rem 0.3rem;
}

/* Website */
.label-website {
    background: #3a3a3a;
    padding: 0.15rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-website span {
    font-size: 0.55rem;
    color: white;
    font-weight: 500;
}

/* Dar etiket için website */
.label-preview.dar .label-website {
    padding: 0.05rem;
}

.label-preview.dar .label-website span {
    font-size: 0.35rem;
    /* Daha belirgin küçültme */
    letter-spacing: -0.2px;
    /* Harfleri biraz sıkıştır */
}

/* Dar etiket için birim */
.label-preview.dar .label-birim {
    padding: 0.3rem 0.2rem;
    padding-top: 0.15rem;
}

.label-preview.dar .label-birim .birim-adi {
    font-size: 0.45rem;
    line-height: 1.1;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.label-preview.dar .label-birim .kod-bilgileri {
    margin-top: 0.15rem;
    font-size: 0.35rem;
}

.label-preview.dar .label-birim .kod-numarasi {
    font-size: 0.3rem;
}

/* Dar etiket için logo alanı */
.label-preview.dar .label-logo {
    padding: 0.4rem 0.2rem;
    padding-bottom: 0.7rem;
}

.label-preview.dar .label-logo::after {
    height: 10px;
}

/* Dar etiket için alt başlık */
.label-preview.dar .label-alt-baslik {
    font-size: 0.55rem;
    /* 0.45rem'den büyütüldü */
    left: 65%;
    max-height: 100px;
}

/* ============================================
   KAYITLI ETİKETLER
   ============================================ */
.saved-labels {
    margin-top: 2rem;
}

.saved-labels-list {
    max-height: 300px;
    overflow-y: auto;
}

.saved-label-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.saved-label-item:hover {
    background: var(--primary-light);
}

.saved-label-info {
    flex: 1;
}

.saved-label-info strong {
    display: block;
    font-size: 0.9rem;
}

.saved-label-info small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.saved-label-actions {
    display: flex;
    gap: 0.5rem;
}

.saved-label-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.saved-label-actions .load-btn {
    background: var(--secondary);
    color: var(--primary-dark);
}

.saved-label-actions .delete-btn {
    background: #dc2626;
    color: white;
}

/* ============================================
   YAZDIR SAYFASI
   ============================================ */
.print-page {
    background: white;
    min-height: 100vh;
}

.print-toolbar {
    background: var(--primary);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.print-toolbar h1 {
    color: white;
    font-size: 1.2rem;
}

.print-toolbar .btn {
    padding: 0.5rem 1.5rem;
}

.print-settings {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.print-settings label {
    color: white;
    font-size: 0.85rem;
}

.print-settings input {
    width: 60px;
    padding: 0.4rem;
    border-radius: 4px;
    border: none;
    text-align: center;
}

.a4-container {
    width: 210mm;
    min-height: 297mm;
    margin: 2rem auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 10mm;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 5mm;
}

/* ============================================
   YAZDIRMA STİLLERİ
   ============================================ */
@media print {
    body {
        background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-toolbar {
        display: none !important;
    }

    .a4-container {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 10mm;
        box-shadow: none;
    }

    .label-preview {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px dashed #ccc !important;
        position: relative;
        overflow: visible !important;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    /* Print Background Colors Fix */
    .label-preview * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Yazdırma modunda seçim efektlerini gizle */
    .label-preview.selected {
        border: 1px dashed #ccc !important;
        transform: none !important;
        box-shadow: none !important;
        z-index: auto !important;
    }

    .label-preview.selected::after {
        display: none !important;
    }

    .label-preview.add-new-btn {
        display: none !important;
    }

    /* Scissors removed as per request */

    .label-preview.dar {
        width: 30mm !important;
    }

    .label-preview.genis {
        width: 50mm !important;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .preview-area {
        min-height: 600px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .main-container {
        padding: 0 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .label-type-selector {
        flex-direction: column;
    }
}

/* ============================================
   ANİMASYONLAR
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

/* Toast Bildirimi */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.toast.error {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

/* ============================================
   ETİKET ÖNİZLEME ETKİLEŞİM STİLLERİ (EKRAN)
   Bu stiller @media print dışında olmalı!
   ============================================ */
.label-preview {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px dashed #ccc !important;
    position: relative;
    overflow: visible !important;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    /* Sadece renk ve gölge animasyonu */
}

.label-preview:hover {
    border-color: #999 !important;
}

.label-preview.selected {
    border: 1px solid var(--gradient-start) !important;
    /* 1px Solid Tematik Renk */
    /* Dışına 1px daha sahte çerçeve ekle */
    box-shadow: 0 0 0 1px var(--gradient-start) !important;
    transform: none !important;
    z-index: 10;
    opacity: 1 !important;
    position: relative;
}

/* Seçili olduğunu belirten ikon GİZLENDİ */
.label-preview.selected::after {
    display: none;
}

/* Yeni Ekle Placeholder */
.label-preview.add-new-btn {
    border: 2px dashed #cbd5e1 !important;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.label-preview.add-new-btn:hover {
    border-color: var(--gradient-start) !important;
    color: var(--gradient-start);
    background: var(--bg-card);
    opacity: 1;
    transform: scale(1.02);
}

/* ============================================
   ONAY MODALI
   ============================================ */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Javascript ile 'display: flex' olunca */
.confirm-modal[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}

.confirm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.confirm-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.confirm-modal[style*="display: flex"] .confirm-modal-content {
    transform: translateY(0);
}

.confirm-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.confirm-modal-header i {
    font-size: 2.5rem;
    color: var(--secondary);
}

.confirm-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.confirm-modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-cancel:hover {
    background: var(--primary-light);
}

.btn-confirm {
    background: #ef4444;
    color: white;
}

.btn-confirm:hover {
    background: #dc2626;
}

/* ============================================
   HEADER & TEMA SEÇİCİ
   ============================================ */
.app-header {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo-img {
    height: 48px;
    width: auto;
}

.header-titles h1 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
}

.header-titles p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.theme-selector {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--primary-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theme-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0;
}

.theme-btn:hover {
    transform: scale(1.15);
}

.theme-btn.active {
    border-color: var(--bg-card);
    /* İç boşluk efekti */
    box-shadow: 0 0 0 2px var(--secondary);
    /* Dış halka */
    transform: scale(1.1);
}

.theme-btn.theme-orange {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.theme-btn.theme-red {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.theme-btn.theme-blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.theme-btn.theme-green {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.theme-btn.theme-brown {
    background: linear-gradient(135deg, #78350f, #92400e);
}

.theme-btn.theme-custom {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.theme-btn.theme-custom.active {
    background: var(--gradient-start);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--secondary);
}

.custom-theme-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

#colorPicker {
    display: none;
}