/* =====================================================
   TEKNIK SERVİS - ADMIN PANEL CSS
   ===================================================== */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- FOCUS STYLES --- */
.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #0d6efd80;
    outline: none;
}

/* =====================================================
   ADMIN LAYOUT — NAVBAR
   ===================================================== */
.admin-navbar {
    height: 56px;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.admin-navbar .navbar-brand {
    font-size: 1.1rem;
    letter-spacing: .5px;
}

/* =====================================================
   ADMIN LAYOUT — SIDEBAR
   ===================================================== */
:root {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 60px;
    --navbar-height: 56px;
    --sidebar-bg: #1a1d23;
    --sidebar-hover: #2c3040;
    --sidebar-active: #0d6efd;
    --sidebar-text: #c8cdd8;
    --sidebar-section: #6c757d;
}

.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: width .25s ease;
    z-index: 1040;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0,0,0,.25);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid #2c3040;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.sidebar-logo {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* ---- Sidebar Navigation ---- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: #3a3f50 transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #3a3f50; border-radius: 4px; }

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--sidebar-section);
    padding: 12px 16px 4px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .2s;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    pointer-events: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background .2s, color .2s;
    font-size: .875rem;
    border-left: 3px solid transparent;
}

.nav-item i {
    font-size: .9rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    transition: opacity .2s;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: #0d6efd80;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left-color: #fff;
    font-weight: 600;
}

/* ---- Sidebar Footer ---- */
.sidebar-footer {
    padding: 10px 16px;
    border-top: 1px solid #2c3040;
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .2s;
}

.sidebar.collapsed .sidebar-footer {
    opacity: 0;
}

/* =====================================================
   ADMIN LAYOUT — MAIN CONTENT
   ===================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--navbar-height);
    min-height: 100vh;
    transition: margin-left .25s ease;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

.content-wrapper {
    padding: 24px;
}

/* =====================================================
   USER AVATAR
   ===================================================== */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: #fff;
    flex-shrink: 0;
}

/* =====================================================
   LOGIN LAYOUT
   ===================================================== */
.login-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1d23 0%, #0d6efd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    padding: 40px;
}

.login-logo {
    font-size: 2.5rem;
    color: #0d6efd;
    margin-bottom: 8px;
}

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h4 {
    margin: 0;
    font-weight: 700;
    color: #1a1d23;
}

/* =====================================================
   STAT CARDS (Dashboard)
   ===================================================== */
.stat-card {
    border: none;
    border-radius: 12px;
    padding: 20px 24px;
    color: #fff;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,.2);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: .85;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .8rem;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bg-gradient-primary   { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.bg-gradient-success   { background: linear-gradient(135deg, #198754, #146c43); }
.bg-gradient-warning   { background: linear-gradient(135deg, #ffc107, #e0a800); color: #1a1d23 !important; }
.bg-gradient-danger    { background: linear-gradient(135deg, #dc3545, #b02a37); }
.bg-gradient-info      { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }
.bg-gradient-secondary { background: linear-gradient(135deg, #6c757d, #545b62); }

/* =====================================================
   TABLE STYLES
   ===================================================== */
.table-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
}

.table-card .table {
    margin-bottom: 0;
}

.table-card .table thead th {
    background: #f8f9fa;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 14px;
    white-space: nowrap;
}

.table-card .table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    font-size: .875rem;
}

/* =====================================================
   STEP INDICATOR (Servis/Create)
   ===================================================== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    transition: background .3s, color .3s;
}

.step.active .step-num {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 4px #0d6efd30;
}

.step.completed .step-num {
    background: #198754;
    color: #fff;
}

.step-label {
    font-size: .75rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.step.active .step-label {
    color: #0d6efd;
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    min-width: 40px;
    max-width: 80px;
    margin-bottom: 20px;
}

/* =====================================================
   SIGNATURE AREA
   ===================================================== */
.signature-wrapper {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #fff;
    position: relative;
}

.signature-wrapper canvas {
    width: 100%;
    height: 160px;
    display: block;
    cursor: crosshair;
    touch-action: none;
}

.signature-wrapper:hover {
    border-color: #0d6efd;
}

/* =====================================================
   FORM CARDS
   ===================================================== */
.form-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 24px;
    margin-bottom: 20px;
}

.form-card .form-card-title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6c757d;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar .nav-item span,
    .sidebar .nav-section-title,
    .sidebar .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }

    .content-wrapper {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .step-line {
        min-width: 20px;
    }
}
