/* public/css/style.css - Premium Glassmorphic Dark Theme */

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

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 28, 45, 0.7);
    --bg-glass: rgba(17, 24, 39, 0.55);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.2);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.3);
    
    --danger: #f43f5e;
    --danger-hover: #e11d48;
    --danger-glow: rgba(244, 63, 94, 0.3);
    
    --warning: #fbbf24;
    --warning-hover: #d97706;
    --warning-glow: rgba(251, 191, 36, 0.3);

    --purple: #8b5cf6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

.text-nowrap {
    white-space: nowrap !important;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--text-primary);
}

/* Layout container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Layout */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-glow);
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
}

.logo-text {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}
.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.nav-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
}

.nav-item.active a {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.05);
}

/* Sidebar Nav Accordion / Dropdown Groups */
.nav-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.25rem;
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    user-select: none;
}

.nav-group-header:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
}

.nav-group.open .nav-group-header,
.nav-group.active-parent .nav-group-header {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.nav-group-header .group-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-group-header .chevron-icon {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.nav-group.open .nav-group-header .chevron-icon {
    transform: rotate(180deg);
    color: #93c5fd;
}

.nav-group-items {
    list-style: none;
    padding-left: 0.85rem;
    margin-top: 0.25rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    border-left: 2px solid rgba(59, 130, 246, 0.25);
    margin-left: 1.35rem;
}

.nav-group.open .nav-group-items {
    display: flex;
}

.nav-subitem a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s ease;
    text-decoration: none;
}

.nav-subitem a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-subitem.active a {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
    font-weight: 600;
}

.user-profile {
    margin-top: auto;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
    border-radius: 8px;
    background: rgba(244, 63, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
    margin-top: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Main Content Layout */
.main-wrapper {
    margin-left: 280px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 280px);
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.branch-indicator {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.35rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branch-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
}

/* Cards & Containers */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    overflow-x: hidden;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.stat-info h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.rose {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.stat-icon.amber {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Forms & UI Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control, .form-select, .form-textarea,
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
    width: 100%;
    box-sizing: border-box !important;
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Standart Metin ve Sayı Inputları */
.form-control,
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="date"], input[type="datetime-local"], input[type="search"] {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 0.85rem !important;
    line-height: 40px !important;
    vertical-align: middle;
}

/* TÜM AÇILIR LİSTELER (STANDART TEK SATIRLIK SELECT / DROPDOWN) */
select:not([size]),
select[size="1"],
.form-select:not([size]),
.form-select[size="1"],
select.form-control:not([size]),
select.form-control[size="1"],
select.form-select:not([size]),
select.form-select[size="1"] {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    line-height: normal !important;
    padding: 0 2.5rem 0 0.85rem !important;
    background-color: #111827 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 1rem 1rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    display: block !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #f3f4f6 !important;
    vertical-align: middle !important;
}

/* ÇOK SATIRLI LİSTE KUTULARI (SELECT WITH SIZE > 1 VEYA MULTIPLE) */
select[size]:not([size="1"]),
select[multiple],
.form-select[size]:not([size="1"]),
.form-select[multiple] {
    height: auto !important;
    min-height: 160px !important;
    max-height: 320px !important;
    line-height: 1.5 !important;
    padding: 0.4rem !important;
    background-color: #111827 !important;
    background-image: none !important;
    -webkit-appearance: listbox !important;
    -moz-appearance: listbox !important;
    appearance: listbox !important;
    cursor: default !important;
    display: block !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #f3f4f6 !important;
    overflow-y: auto !important;
    border-radius: 10px !important;
}

/* Açılır Liste Seçenekleri (Options / Optgroups) */
select option,
select optgroup,
.form-select option,
.form-select optgroup {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

select optgroup {
    font-weight: 700 !important;
    color: #93c5fd !important;
    background-color: #1e293b !important;
    font-style: normal !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Odaklanma (Focus) Durumları */
.form-control:focus, 
.form-select:focus, 
input:focus, 
select:focus, 
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background-color: rgba(17, 24, 39, 0.95);
}

/* Tablo İçi ve Modal İçi Form Elemanları (Sıkışmayı Önleyen Ferah Kurallar) */
.custom-table .form-control,
.custom-table input[type="text"],
.custom-table input[type="number"],
.po-item-row .form-control,
.po-item-row input[type="text"],
.po-item-row input[type="number"] {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 36px !important;
    padding: 0 0.65rem !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
}

.custom-table select,
.custom-table .form-select,
.po-item-row select,
.po-item-row .form-select {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: normal !important;
    padding: 0 1.45rem 0 0.6rem !important;
    background-position: right 0.4rem center !important;
    background-size: 0.75rem 0.75rem !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
}

/* Küçük Boyutlu Input & Select Elemanları */
.form-control-sm,
.form-select-sm,
select.form-control-sm,
select.form-select-sm,
input.form-control-sm {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    font-size: 0.82rem !important;
    padding-left: 0.65rem !important;
    padding-right: 2rem !important;
}

/* Modal Başlık İçi Hap (Pill) Select Stili */
select.select-inline-pill,
.select-inline-pill {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    line-height: normal !important;
    padding: 0 1.6rem 0 0.4rem !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c084fc'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.2rem center !important;
    background-size: 0.85rem 0.85rem !important;
}

/* Modal Sekme Çubukları Scrollbar Gizleme & Kaymayı Önleme */
.mdl-tab-bar,
.modal-tabs,
.tab-scroll-container,
[style*="overflow-x: auto"] {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.mdl-tab-bar::-webkit-scrollbar,
.modal-tabs::-webkit-scrollbar,
.tab-scroll-container::-webkit-scrollbar,
[style*="overflow-x: auto"]::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Metin Alanı (Textarea) */
.form-textarea,
textarea.form-control {
    min-height: 90px !important;
    height: auto !important;
    line-height: 1.5 !important;
    padding: 0.65rem 0.85rem !important;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px var(--success-glow);
}
.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px var(--danger-glow);
}
.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: #000;
    box-shadow: 0 4px 12px var(--warning-glow);
}
.btn-warning:hover {
    background: var(--warning-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
}

.badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge.approved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.rejected {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Table Style */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    word-break: normal;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.custom-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Production Timeline and Workflow Cards */
.production-pipeline {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.pipeline-stage {
    min-width: 250px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.stage-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stage-count {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

.pipeline-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pipeline-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

/* Mobile-Specific Menu and Responsive Adjustments */
.mobile-header {
    display: none;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 110;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.hamburger {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Barcode Card */
.barcode-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: black;
    margin: 1rem 0;
    border: 2px dashed #ccc;
    max-width: 300px;
}

.barcode-stripes {
    letter-spacing: 0.3em;
    font-family: monospace;
    font-size: 2.5rem;
    font-weight: 100;
}

@media (max-width: 1024px) {
    .sidebar {
        left: -280px;
    }
    .sidebar.open {
        left: 0;
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .mobile-header {
        display: flex;
    }
    .top-bar {
        display: none; /* Mobile header takes its place */
    }
    .content-body {
        margin-top: 60px;
        padding: 1.25rem;
    }
}

/* Boss Cost Dashboard Styling */
.metric-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.country-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.country-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.chart-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.badge.repairing {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulseBorderRed 2s infinite;
}

@keyframes pulseBorderRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- Tooltip / Info Bubble --- */
.info-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    margin-left: 0.4rem;
    position: relative;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.info-bubble:hover {
    background-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.info-bubble::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.info-bubble::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.info-bubble:hover::after,
.info-bubble:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   📄 PRINT / PDF Export Stilleri
   window.print() veya Ctrl+P ile tetiklenir
   ═══════════════════════════════════════════════════════════════ */
@media print {
    /* Baskıda gizle */
    .sidebar,
    .mobile-header,
    .top-bar,
    .btn,
    .btn-outline,
    .btn-primary,
    .btn-danger,
    .btn-logout,
    .no-print,
    form,
    .feedback-btn,
    nav,
    [data-no-print] {
        display: none !important;
    }

    /* Layout sıfırla */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
        margin: 0;
    }

    .app-container {
        display: block !important;
    }

    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .content-body {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Kart ve cam görünümünü temizle */
    .glass-card,
    .stat-card,
    .card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        page-break-inside: avoid;
        margin-bottom: 12pt;
    }

    /* Tablo baskı görünümü */
    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
    }

    th, td {
        border: 1px solid #aaa !important;
        padding: 4pt 6pt !important;
        color: #000 !important;
        background: transparent !important;
    }

    th {
        background: #f0f0f0 !important;
        font-weight: 700;
    }

    tr:nth-child(even) td {
        background: #fafafa !important;
    }

    /* Renkli badge/durum etiketleri */
    .badge, [class*="badge"] {
        border: 1px solid #999 !important;
        color: #000 !important;
        background: transparent !important;
    }

    /* Sayfa kenar boşlukları */
    @page {
        margin: 15mm 15mm 15mm 15mm;
        size: A4 portrait;
    }

    /* Tablolar sayfa kırılmaları */
    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }
    tr    { page-break-inside: avoid; }

    /* H1/H2 başlıktan önce sayfa kırma */
    h1 { page-break-before: always; }
    h1:first-child { page-break-before: avoid; }

    /* Link'leri plain text göster */
    a { color: #000 !important; text-decoration: none !important; }

    /* Baskıda görünür olmasını istediğin öğe */
    .print-only { display: block !important; }
}

/* Baskı butonu yardımcı sınıfı */
.print-only {
    display: none;
}
.btn-print {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.btn-print:hover {
    background: rgba(255,255,255,0.14);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.2);
}

/* ========================================================
   ERP GLOBAL MODAL & UI UTILITIES (Saf CSS / Glassmorphic)
   ======================================================== */
.erp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2.5rem 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.erp-modal-overlay.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
}

.erp-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    margin: 1rem auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px var(--primary-glow);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.erp-modal-box form {
    display: block;
    width: 100%;
    margin: 0;
}

.erp-modal-box.modal-lg {
    max-width: 800px;
}

.erp-modal-box.modal-sm {
    max-width: 420px;
}

.erp-modal-overlay.show .erp-modal-box {
    transform: scale(1);
}

.erp-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.erp-modal-header h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.erp-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.erp-modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.erp-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

/* Badge Renk Varyantları */
.badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.po-row {
    transition: background 0.15s ease;
}

.po-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

