/* ==========================================================================
   ADMIN PANEL & WORKSHOP PRODUCTION STYLES
   Easy Management, Order Pipeline, Production Cutting Slip, Price Editor
   ========================================================================== */

.admin-body {
    background: #f1f5f9;
    color: #1e293b;
    font-family: var(--font-body);
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 270px;
    background: var(--primary-900);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.admin-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar-header img {
    height: 44px;
    border-radius: var(--radius-sm);
}

.admin-brand-info h4 {
    color: #ffffff;
    font-size: 1.05rem;
    line-height: 1.2;
}

.admin-brand-info span {
    font-size: 0.72rem;
    color: var(--gold-300);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.admin-nav-btn {
    background: none;
    color: var(--text-light-muted);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    transition: all var(--transition-fast);
}

.admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.admin-nav-btn.active {
    background: var(--gold-gradient);
    color: var(--primary-900);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(201, 155, 39, 0.3);
}

.admin-sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 270px;
    padding: 30px 40px 60px;
    background: #f8fafc;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: #ffffff;
    padding: 18px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.admin-page-title h2 {
    font-size: 1.55rem;
    color: var(--primary-900);
}

.admin-page-title p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dashboard Stat Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: #ffffff;
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition-fast);
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--gold-100);
    color: var(--gold-600);
}

.stat-info-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-info-text h3 {
    font-size: 1.6rem;
    color: var(--primary-900);
    font-weight: 800;
}

/* Tables & Cards */
.admin-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 32px;
}

.admin-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.admin-card-header h3 {
    font-size: 1.15rem;
    color: var(--primary-900);
}

.admin-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    color: var(--primary-800);
    padding: 14px 18px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #fcfcfd;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.odeme_bekleniyor {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.onaylandi {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.imalatta {
    background: #fef9c3;
    color: #854d0e;
}

.status-badge.kargoda {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.tamamlandi {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.iptal {
    background: #fee2e2;
    color: #991b1b;
}

/* Workshop Production Cutting Slip (Atölye İmalat Kesim Fişi) */
.production-slip-modal {
    background: #ffffff;
    max-width: 860px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.production-slip-paper {
    padding: 30px;
    background: #ffffff;
    color: #0f172a;
}

.slip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.slip-header-brand h3 {
    font-size: 1.4rem;
    color: var(--primary-900);
}

.slip-header-brand p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.slip-meta-box {
    text-align: right;
}

.slip-meta-box h4 {
    font-size: 1.25rem;
    color: var(--primary-900);
}

.slip-cut-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.85rem;
}

.slip-cut-table th, .slip-cut-table td {
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    text-align: center;
}

.slip-cut-table th {
    background: #f1f5f9;
    font-weight: 700;
}

.highlight-cut-measure {
    font-weight: 800;
    color: #b91c1c;
    font-size: 0.95rem;
}

.slip-footer-notes {
    border-top: 1px dashed #cbd5e1;
    padding-top: 16px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #475569;
}

/* Print Rules */
@media print {
    body * {
        visibility: hidden;
    }
    .production-slip-paper, .production-slip-paper * {
        visibility: visible;
    }
    .production-slip-paper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 10mm;
    }
    .no-print {
        display: none !important;
    }
}

/* Tab View Panels */
.admin-tab-pane {
    display: none;
}

.admin-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Settings Form Grid */
.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 24px;
}

.full-width-col {
    grid-column: span 2;
}

.logo-preview-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.logo-preview-box img {
    height: 60px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    background: #ffffff;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 70px;
    }
    .admin-sidebar-header .admin-brand-info,
    .admin-nav-btn span,
    .admin-sidebar-footer {
        display: none;
    }
    .admin-main {
        margin-left: 70px;
        padding: 20px;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
