/* Modern Design System */
:root {
    --primary-h: 245;
    --primary-s: 82%;
    --primary-l: 67%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 55%);
    --primary-light: hsl(var(--primary-h), var(--primary-s), 95%);
    --primary-soft: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
    
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    color: var(--slate-800);
    line-height: 1.6;
    background: #f8fafc;
    min-height: 100vh;
}

/* Premium Animated Background */
.bg-mesh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,0.03) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,0.05) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,0.05) 0, transparent 50%);
    opacity: 0.8;
}

/* Layout */
.main-content {
    margin-left: 0;
    padding: 80px 16px 100px 16px;
    min-height: 100vh;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: 280px;
        padding: 100px 40px 40px 40px;
    }
    
    .sidebar.collapsed ~ .main-content {
        margin-left: 100px;
    }
}

/* Mobile Friendly Utilities */
.mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modern-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease;
}

.modern-card:active {
    transform: scale(0.98);
}

.desktop-only {
    display: none !important;
}

.mobile-only {
    display: block !important;
}

@media (min-width: 1024px) {
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* Navbar Modernization */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    box-shadow: var(--glass-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 20px;
    left: 300px;
    right: 20px;
    z-index: 150;
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .navbar {
    left: 120px;
}

.navbar-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.navbar-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.user-info {
    font-weight: 500;
    font-size: 14px;
    color: var(--slate-800);
}

.btn-logout {
    padding: 10px 20px;
    background: #fff;
    color: #ef4444;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.2);
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
}

/* Sidebar Modernization */
.sidebar {
    position: fixed;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .clinic-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header-content {
    justify-content: center;
}

.clinic-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.clinic-logo svg {
    width: 22px;
    height: 22px;
    color: white;
}

.clinic-info {
    flex: 1;
    min-width: 0;
}

.clinic-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clinic-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #cbd5e1;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.sidebar-header:hover .sidebar-toggle {
    opacity: 1;
    pointer-events: all;
}

.sidebar.collapsed .sidebar-toggle {
    right: 50%;
    transform: translate(50%, -50%) rotate(180deg);
    opacity: 1;
    pointer-events: all;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.mobile-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
}

.mobile-close-btn svg {
    width: 24px;
    height: 24px;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 12px;
}

.nav-item {
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    margin: 4px 0;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 24px;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, hsla(var(--primary-h), var(--primary-s), 50%, 1) 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.nav-item.active .nav-icon {
    color: white;
}

.nav-item-text {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-item-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 20px 8px;
    margin-top: 4px;
}

/* ── Collapsible nav group (e.g. SMS) ─────────────────────────── */
.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-group-trigger {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    margin: 4px 0;
    cursor: pointer;
    position: relative;
}

.nav-group-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 24px;
}

.nav-group.open .nav-group-trigger {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.nav-group-label {
    flex: 1;
}

.nav-group-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: rgba(255, 255, 255, 0.45);
}

.nav-group.open .nav-group-chevron {
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.7);
}

.nav-group-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease;
    opacity: 0;
}

.nav-group.open .nav-group-items {
    max-height: 300px;
    opacity: 1;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 44px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    margin: 2px 0;
    transition: all 0.2s ease;
    position: relative;
}

.nav-sub-item::before {
    content: "";
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.2s ease;
}

.nav-sub-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-sub-item:hover::before {
    background: rgba(255, 255, 255, 0.6);
}

.nav-sub-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, hsla(var(--primary-h), var(--primary-s), 50%, 1) 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.25);
}

.nav-sub-item.active::before {
    background: #ffffff;
}

.nav-sub-icon {
    display: none;
}

.sidebar.collapsed .nav-group-trigger {
    justify-content: center;
    padding-left: 14px;
}

.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .nav-group-chevron {
    display: none;
}

.sidebar.collapsed .nav-group-items {
    display: none;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 12px 16px;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-divider {
    margin: 12px 20px;
}

.nav-item-logout {
    color: #f87171;
    margin-top: auto;
    margin-bottom: 12px;
}

.nav-item-logout:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.nav-item-logout:hover::before {
    background: #f87171;
}

.nav-item-logout .nav-icon {
    stroke: #f87171;
}

.nav-item-logout.active {
    background: rgba(248, 113, 113, 0.15);
}

/* Login */
.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: transparent;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #6366f1;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: hsl(var(--primary-h), var(--primary-s), 60%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Dashboard */
.dashboard {
    margin-top: 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.1);
}

.stat-card h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 12px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -1px;
}

/* Tables */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 28px;
}

/* Appointment Header */
.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    margin-top: 20px; /* Navbar zaten padding sağladığı için düşürdük */
}

.appointment-header-left {
    flex: 1;
}

.appointment-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.appointment-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.appointment-header-right {
    display: flex;
    align-items: center;
}

.btn-new-appointment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-new-appointment:hover {
    background: #2563eb;
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* View Selector */
.view-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--glass-bg);
    color: var(--slate-800);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.view-btn-active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.view-btn-active:hover {
    background: hsl(var(--primary-h), var(--primary-s), 60%);
}

.view-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Appointment Search Bar */
.appointment-search-bar {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: #9ca3af;
    stroke-width: 2;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Appointment Table Container */
.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Appointment Table */
.appointment-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.appointment-table thead {
    background: rgba(var(--primary-h), var(--primary-s), var(--primary-l), 0.05);
}

.appointment-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-800);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.appointment-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(var(--primary-h), var(--primary-s), var(--primary-l), 0.05);
    font-size: 14px;
    color: var(--slate-800);
    font-weight: 500;
}

.appointment-table tbody tr {
    transition: all 0.2s ease;
}

.appointment-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.5);
}

.appointment-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Content */
.table-cell-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge-pending {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.status-badge-confirmed {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.status-badge-completed {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge-cancelled {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-badge-no-show {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.status-badge-postponed {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.status-badge-follow-up {
    background: #f5f3ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

/* Colored status select (appointment forms) */
.form-select.status-select-color {
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.form-select.status-select-color.status-pending {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
}

.form-select.status-select-color.status-confirmed {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.form-select.status-select-color.status-completed {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.form-select.status-select-color.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.form-select.status-select-color.status-no-show {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.form-select.status-select-color.status-postponed {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}

.form-select.status-select-color.status-follow-up {
    background: #f5f3ff;
    color: #6b21a8;
    border-color: #d8b4fe;
}

#modal-doctor-services {
    min-height: 120px;
}

/* Source Badge */
.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.source-badge-online {
    background: #dbeafe;
    color: #1e40af;
}

.source-badge-person {
    background: #e5e7eb;
    color: #374151;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    text-decoration: none;
}

.action-btn-edit {
    color: #3b82f6;
}

.action-btn-edit:hover {
    background: #dbeafe;
}

.action-btn-delete {
    color: #ef4444;
}

.action-btn-delete:hover {
    background: #fee2e2;
}

.action-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Appointment Detail Page */
.appointment-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    margin-top: 80px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #5a6268;
    color: white;
}

.back-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.appointment-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.btn-delete-detail {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: #ef4444;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete-detail:hover {
    background: #dc2626;
}

.detail-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.detail-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.btn-new-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-new-action:hover {
    background: #2563eb;
}

.appointment-detail-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.detail-section.patient-info-section .section-title-row {
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.detail-section.patient-info-section .info-grid {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.section-title-row .section-title {
    margin: 0;
}

.btn-link-patient {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.08);
}

.btn-link-patient:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.btn-link-patient-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-meta-grid {
    margin-bottom: 20px;
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.info-value {
    font-size: 15px;
    color: #1f2937;
}

/* Appointment Form */
.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-label-inline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.form-label-inline input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.bulk-sms-patient-select {
    width: 100%;
    min-height: 280px;
    font-size: 14px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--slate-800);
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    stroke-width: 2;
    pointer-events: none;
}

.select-wrapper {
    position: relative;
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    stroke-width: 2;
    pointer-events: none;
}

.form-select {
    appearance: none;
    padding-right: 40px;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: white;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea::placeholder {
    color: #9ca3af;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.btn-cancel {
    padding: 12px 24px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-cancel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-cancel-link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #4b5563;
}

.btn-save {
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #2563eb;
}

.btn-save.btn-save-danger {
    background: #dc2626;
}

.btn-save.btn-save-danger:hover {
    background: #b91c1c;
}

/* Calendar View */
#calendar-view {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-today {
    padding: 8px 16px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-today:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.calendar-arrows {
    display: flex;
    gap: 4px;
}

.calendar-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-arrow:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.calendar-arrow svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.calendar-date-range {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.calendar-view-selector {
    display: flex;
    gap: 8px;
}

.calendar-view-btn {
    padding: 8px 16px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-view-btn:hover {
    background: #f9fafb;
}

.calendar-view-btn-active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.calendar-view-btn-active:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.calendar-grid {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: auto;
    max-height: 700px;
    background: white;
}

.calendar-time-column {
    width: 90px;
    background: #f8fafc;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 20;
}

.time-column-header-spacer {
    height: 60px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 21;
}

.time-slot {
    padding: 0 10px;
    font-size: 12px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-weight: 500;
    box-sizing: border-box;
}

.calendar-days {
    display: flex;
    flex: 1;
    min-width: 800px;
    background: white;
}

@media (max-width: 768px) {
    .calendar-grid {
        max-height: 500px;
    }
    .calendar-days {
        min-width: 600px;
    }
    .calendar-time-column {
        width: 60px;
    }
    .time-slot {
        font-size: 10px;
    }
}

.calendar-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.day-header {
    height: 60px;
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.day-name {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: capitalize;
}

.day-number {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.calendar-day.calendar-day-today .day-header {
    background: #dbeafe;
    border-bottom-color: #93c5fd;
}

.calendar-day.calendar-day-today .day-name,
.calendar-day.calendar-day-today .day-number {
    color: #1d4ed8;
}

.calendar-day.calendar-day-today .day-cells {
    background: #eff6ff;
}

.calendar-day.calendar-day-today .day-cell {
    background: rgba(219, 234, 254, 0.35);
}

.calendar-day.calendar-day-today .day-cell:hover {
    background: rgba(191, 219, 254, 0.55);
}

.day-cells {
    position: relative;
    flex: 1;
    background: white;
}

.day-cell {
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #e2e8f0;
    box-sizing: border-box;
    position: relative;
}

.day-cell.day-cell-hour-break {
    border-bottom: 1px solid #e2e8f0;
}

.day-cell:hover {
    background: #f8fafc;
}

.day-cell.day-cell-drop-target {
    background: #dbeafe !important;
}

.calendar-appointment {
    position: absolute;
    left: 6px;
    right: 6px;
    z-index: 2;
    border-radius: 10px;
    padding: 8px 10px;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    min-height: 0;
    cursor: grab;
}

.calendar-appointment:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.calendar-appointment:active {
    cursor: grabbing;
}

.calendar-appointment.calendar-appointment-dragging {
    opacity: 0.65;
}

.calendar-appointment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-appointment-time {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #0f172a;
}

.calendar-appointment-status {
    font-size: 10px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    white-space: nowrap;
}

.calendar-appointment-patient {
    font-size: 13px;
    line-height: 1.28;
    color: #0f172a;
    font-weight: 600;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendar-appointment-service {
    font-size: 11px;
    line-height: 1.2;
    color: #334155;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.calendar-appointment-pending {
    background: #fef9c3;
    border-left-color: #ca8a04;
}

.calendar-appointment-confirmed {
    background: #dbeafe;
    border-left-color: #2563eb;
}

.calendar-appointment-completed {
    background: #dcfce7;
    border-left-color: #15803d;
}

.calendar-appointment-cancelled {
    background: #fee2e2;
    border-left-color: #dc2626;
}

.calendar-appointment-no-show {
    background: #e2e8f0;
    border-left-color: #475569;
}

.calendar-appointment-control.calendar-appointment-pending {
    background: linear-gradient(135deg, #fef9c3 0%, #ede9fe 100%);
    border-left-color: #7c3aed;
}

.calendar-appointment-control.calendar-appointment-confirmed {
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    border-left-color: #7c3aed;
}

.calendar-appointment-control.calendar-appointment-completed {
    background: linear-gradient(135deg, #dcfce7 0%, #ede9fe 100%);
    border-left-color: #6d28d9;
}

.calendar-appointment-control.calendar-appointment-cancelled {
    background: linear-gradient(135deg, #fee2e2 0%, #f5f3ff 100%);
    border-left-color: #7c3aed;
}

.calendar-appointment-control.calendar-appointment-no-show {
    background: linear-gradient(135deg, #e2e8f0 0%, #ede9fe 100%);
    border-left-color: #6d28d9;
}

/* Online randevu — modern gri tonu, tüm status renklerinin üzerine bindirilir */
.calendar-appointment-online {
    background: #f1f5f9 !important;
    border-left-color: #64748b !important;
    color: #1e293b;
}

.calendar-appointment-online .calendar-appointment-patient,
.calendar-appointment-online .calendar-appointment-time,
.calendar-appointment-online .calendar-appointment-service {
    color: #334155;
}

/* İnce "Online" etiketi — sağ üst köşe */
.calendar-appointment-online::after {
    content: "Online";
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #64748b;
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.5;
    pointer-events: none;
}

/* New statuses */
.calendar-appointment-postponed {
    background: #fff7ed;
    border-left-color: #ea580c;
}

.calendar-appointment-follow-up {
    background: #f5f3ff;
    border-left-color: #7c3aed;
}

.calendar-appointment-control.calendar-appointment-postponed {
    background: linear-gradient(135deg, #fff7ed 0%, #ede9fe 100%);
    border-left-color: #7c3aed;
}

.calendar-appointment-control.calendar-appointment-follow-up {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-left-color: #6d28d9;
}

/* ========================
   STATUS FILTER BAR
   ======================== */
.status-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 14px;
}

.status-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 2px;
    white-space: nowrap;
}

.status-filter-btn {
    padding: 5px 13px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.status-filter-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.status-filter-btn-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
}

/* ========================
   STATUS CHANGE PANEL (action modal)
   ======================== */
.status-change-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 4px;
}

.status-change-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
}

.status-change-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-btn {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    white-space: nowrap;
}

.status-btn:hover {
    background: #f1f5f9;
    border-color: #6366f1;
    color: #4338ca;
}

.status-btn-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 700;
}

.calendar-appointment-body-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.calendar-appointment-note-inline {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
}

.calendar-appointment-note-btn {
    flex-shrink: 0;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.calendar-appointment-note-btn:hover {
    background: #fff;
}

.calendar-appointment-compact .calendar-appointment-note-inline,
.calendar-appointment-tight .calendar-appointment-note-inline {
    display: none;
}

.appointment-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
}

.appointment-mode-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.appointment-mode-tab-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.modal-dialog-wide {
    max-width: 560px;
}

.modal-dialog-compact {
    max-width: 420px;
}

.calendar-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-note-block {
    margin-bottom: 14px;
}

.calendar-note-block strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.calendar-note-block p {
    margin: 0;
    white-space: pre-wrap;
}

.calendar-appointment-stacked {
    padding: 6px 8px;
    gap: 2px;
}

.calendar-appointment-stacked .calendar-appointment-patient {
    font-size: 11px;
    -webkit-line-clamp: 3;
}

.calendar-appointment-stacked .calendar-appointment-time,
.calendar-appointment-stacked .calendar-appointment-status {
    font-size: 9px;
}

.calendar-appointment-stacked .calendar-appointment-note-btn {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.calendar-overlay-block {
    position: absolute;
    left: 6px;
    right: 6px;
    z-index: 3;
    border-radius: 10px;
    padding: 8px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    pointer-events: auto;
    cursor: default;
    min-height: 0;
}

.calendar-overlay-block.calendar-overlay-meeting {
    background: #1e293b;
    border-left-color: #0f172a;
    color: #f8fafc;
}

.calendar-overlay-block.calendar-overlay-meeting .calendar-appointment-time,
.calendar-overlay-block.calendar-overlay-meeting .calendar-appointment-patient,
.calendar-overlay-block.calendar-overlay-meeting .calendar-appointment-header,
.calendar-overlay-block.calendar-overlay-meeting span {
    color: #f1f5f9;
}

.calendar-overlay-block.calendar-overlay-meeting.calendar-overlay-deletable:hover {
    background: #334155;
    filter: none;
}

.calendar-overlay-block.calendar-overlay-holiday {
    background: #fce7f3;
    border-left-color: #db2777;
}

.calendar-overlay-block.calendar-overlay-nur {
    background: #e0f2fe;
    border-left-color: #0284c7;
}

.calendar-overlay-block.calendar-overlay-deletable {
    cursor: pointer;
}

.calendar-overlay-block.calendar-overlay-deletable:hover {
    filter: brightness(0.97);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}

.calendar-overlay-compact {
    padding: 4px 6px;
    gap: 2px;
    border-radius: 8px;
}

.calendar-overlay-compact .calendar-appointment-header {
    margin: 0;
}

.calendar-overlay-tight .calendar-appointment-patient {
    font-size: 12px;
    -webkit-line-clamp: 1;
}

.calendar-appointment-compact {
    padding: 4px 6px;
    gap: 2px;
    border-radius: 8px;
}

.calendar-appointment-compact .calendar-appointment-status,
.calendar-appointment-compact .calendar-appointment-patient {
    display: none;
}

.calendar-appointment-compact .calendar-appointment-time {
    font-size: 10px;
}

.calendar-appointment-tight {
    padding: 6px 8px;
    gap: 2px;
}

.calendar-appointment-tight .calendar-appointment-status {
    display: none;
}

.calendar-appointment-tight .calendar-appointment-patient {
    font-size: 12px;
    line-height: 1.15;
    -webkit-line-clamp: 1;
}

/* Patient List Page */
.patient-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    margin-top: 80px;
}

.patient-list-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.btn-add-patient {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-add-patient:hover {
    background: #2563eb;
}

.patient-search-bar {
    margin-bottom: 20px;
}

/* Patient Table */
.patient-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.patient-table thead {
    background: #f9fafb;
}

.patient-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.patient-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

.patient-table tbody tr:hover {
    background: #f9fafb;
}

.patient-table tbody tr:last-child td {
    border-bottom: none;
}

/* Patient Actions */
.patient-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    color: #3b82f6;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-detail:hover {
    background: #dbeafe;
}

.btn-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    color: #ef4444;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete:hover {
    background: #fee2e2;
}

.patient-actions .action-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Patient Detail Page */
.patient-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    margin-top: 80px;
}

.patient-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.patient-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #5a6268;
}

.btn-print {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-print:hover {
    background: #059669;
}

.patient-detail-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.btn-new-transaction {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-new-transaction:hover {
    background: #2563eb;
}

/* Transaction Table */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.transaction-table thead {
    background: #f9fafb;
}

.transaction-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.transaction-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

.transaction-table tbody tr:hover {
    background: #f9fafb;
}

.transaction-table tbody tr:last-child td {
    border-bottom: none;
}

.transaction-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: #3b82f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view-detail:hover {
    background: #dbeafe;
}

.btn-delete-transaction {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete-transaction:hover {
    background: #fee2e2;
}

.transaction-actions .action-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Patient Register Form */
.patient-register-header {
    margin-bottom: 24px;
    margin-top: 80px;
}

.patient-register-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
}

.patient-register-form-container {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.patient-register-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.required {
    color: #ef4444;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.phone-input-group {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
}

.phone-country-select {
    min-width: 0;
}

.form-checkboxes {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: white;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea::placeholder {
    color: #9ca3af;
}

.kvkk-section {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 8px;
}

.kvkk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.kvkk-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.kvkk-link {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}

.kvkk-link:hover {
    color: #2563eb;
}

.kvkk-checkbox {
    margin-top: 8px;
}

.kvkk-checkbox span {
    font-size: 14px;
    color: #374151;
}

.patient-register-form .form-actions {
    margin-top: 8px;
}

.patient-register-form .btn-save {
    padding: 12px 32px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.patient-register-form .btn-save:hover {
    background: #2563eb;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    .appointment-table,
    .patient-table,
    .data-table {
        min-width: 700px;
    }
}

.data-table th {
    background: #f9fafb;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background: #f9fafb;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    background: #6366f1;
    color: white;
    border-radius: 4px;
}

.btn-back {
    padding: 8px 16px;
    background: #6b7280;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

/* Messages */
.messages {
    margin: 20px 0;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

/* Search & Filters */
.search-bar {
    margin-bottom: 20px;
}

.search-bar form {
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background: #f9fafb;
}

.appointment-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background-color: #fff;
}

.pagination-summary {
    font-size: 13px;
    color: #6b7280;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-link {
    min-width: 36px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    background-color: #fff;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.pagination-link.active {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

@media (max-width: 768px) {
    .appointment-pagination {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .modal-dialog {
        margin: 0;
        border-radius: 24px 24px 0 0 !important;
        max-height: 95vh;
        width: 100% !important;
        max-width: 100% !important;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1);
    }
    
    .modal-overlay.show .modal-dialog {
        transform: translateY(0);
    }
    
    .modal-dialog::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 48px;
        height: 5px;
        background: #e2e8f0;
        border-radius: 10px;
        z-index: 100;
    }
    
    .modal-header {
        padding: 28px 20px 16px 20px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    .modal-body {
        padding: 20px !important;
    }
    
    .modal-title {
        font-size: 1.15rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .sidebar, .navbar {
        display: none !important;
    }
}

/* Bottom Nav Styles */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 64px;
    height: auto;
    background: #fff;
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
    z-index: 9000;
    justify-content: space-around;
    align-items: flex-end;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1023px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Köhnə desktop/mobil bottom-nav və FAB — yeni nav ilə üst-üstə düşməsin */
    .bottom-nav,
    .fab-container,
    .fab-overlay {
        display: none !important;
    }
}

.mobile-bottom-nav .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex: 1;
    min-width: 0;
    max-width: 80px;
    color: var(--slate-500);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.mobile-bottom-nav .bottom-nav-item svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}

.mobile-bottom-nav .bottom-nav-item.active {
    color: var(--primary);
}

.mobile-bottom-nav .bottom-nav-item.active svg {
    fill: none;
    stroke: currentColor;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--slate-500);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 8px;
    background: none;
    border: none;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-fab-space {
    width: 60px;
}

/* FAB Styles */
.mobile-fab-container {
    display: none;
    position: fixed;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 9001;
    pointer-events: none;
}

.mobile-fab-container .mobile-fab {
    pointer-events: auto;
}

@media (max-width: 1023px) {
    .mobile-fab-container {
        display: block;
    }
}

.mobile-fab {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-fab:active {
    transform: scale(0.9);
}

.mobile-fab svg {
    width: 28px;
    height: 28px;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-dialog-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.btn-print-modal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-print-modal:hover {
    background: #059669;
}

.btn-print-modal .btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.btn-cancel-modal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-modal:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .appointment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
}

.input-with-icon input[type="time"] {
    padding-right: 40px;
}

/* Appointment modal: keep only one calendar icon and improve date input UX */
.input-with-icon-date .form-input {
    padding-right: 12px;
    cursor: pointer;
}

#modal-date {
    min-height: 44px;
}

#modal-date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
}

#modal-date:focus::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.input-with-icon-left {
    position: relative;
}

.input-with-icon-left input {
    padding-left: 40px;
    padding-right: 40px;
}

.input-icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    stroke-width: 2;
    pointer-events: none;
}

/* Sub Transactions */
.sub-transactions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-transactions-container {
    min-height: 150px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-sub-transactions {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    padding: 40px 20px;
}

.sub-transaction-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}

.sub-transaction-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-remove-sub-transaction {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-remove-sub-transaction:hover {
    background: #fee2e2;
}

.sub-transactions-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-barcode {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-barcode:hover {
    background: #2563eb;
}

.btn-barcode .btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.btn-add-transaction {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-transaction:hover {
    background: #059669;
}

.btn-add-transaction .btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Searchable Select */
.searchable-select-wrapper {
    position: relative;
}

.searchable-select {
    position: relative;
}

.searchable-select-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s;
    font-family: inherit;
    cursor: pointer;
}

.searchable-select-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.searchable-select-input::placeholder {
    color: #9ca3af;
}

.searchable-select .select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    stroke-width: 2;
    pointer-events: none;
}

.searchable-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 10000;
}

.searchable-select-options.show {
    display: block;
}

.searchable-select-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 15px;
    color: #1f2937;
}

.searchable-select-option:hover {
    background: #f3f4f6;
}

.searchable-select-option.selected {
    background: #dbeafe;
    color: #1e40af;
}

.searchable-select-option.hidden {
    display: none;
}

/* Settings Page */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    margin-top: 80px;
}

.settings-header-left {
    flex: 1;
}

.settings-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.settings-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.settings-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.settings-overview-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-overview-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-overview-value {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.settings-overview-url {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.settings-overview-url-text {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.settings-status-badge.is-active {
    color: #166534;
    background: #dcfce7;
}

.settings-status-badge.is-inactive {
    color: #92400e;
    background: #fef3c7;
}

.btn-copy-url {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-url:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.btn-copy-url:disabled {
    cursor: default;
    opacity: 0.7;
}

.settings-header-right {
    display: flex;
    align-items: center;
}

.btn-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-preview:hover {
    background: #2563eb;
}

.btn-preview .btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    color: #6b7280;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-tab:hover {
    color: #3b82f6;
}

.settings-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.settings-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.settings-section-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Toggle Switch */
.settings-toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-toggle-label {
    flex: 1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3b82f6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Input Group URL */
.input-group-url {
    display: flex;
    align-items: center;
}

.input-group-text {
    padding: 12px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 15px;
    color: #6b7280;
}

.input-group-url .form-input {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.input-group-url .form-input:focus {
    border-left: 1px solid #3b82f6;
}

/* Color Picker */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: white;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-input {
    width: 110px;
    padding: 10px 12px;
    font-size: 14px;
}

.palette-icon {
    width: 18px;
    height: 18px;
    color: #6b7280;
    stroke-width: 2;
    margin-right: 6px;
    vertical-align: middle;
}

.info-icon {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    stroke-width: 2;
    margin-left: 4px;
    vertical-align: middle;
}

.form-help-text {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 8px 0;
}

.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.form-group-inline {
    margin-bottom: 8px;
}

.checkbox-inline .checkbox-label {
    margin-bottom: 0;
}

/* Logo Upload */
.logo-upload-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px dashed #c7d2fe;
    border-radius: 10px;
    background: #f8faff;
}

.logo-upload-preview {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-preview-placeholder {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.logo-upload-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.logo-file-input {
    display: none;
}

.btn-upload-logo {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload-logo:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.logo-file-name {
    font-size: 13px;
    color: #6b7280;
}

.logo-clear-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

/* Working Days */
.working-days-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.working-day-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.working-day-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.working-day-pill span {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: white;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.working-day-pill span:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.working-day-pill input[type="checkbox"]:checked + span {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.settings-actions .btn-save {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-actions .btn-save:hover {
    background: #2563eb;
}

.settings-actions .btn-save .btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Services Tab */
.services-header {
    margin-bottom: 24px;
}

.services-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.services-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.services-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.services-table {
    width: 100%;
    border-collapse: collapse;
}

.services-table thead {
    background: #f9fafb;
}

.services-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.services-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1f2937;
}

.services-table tbody tr:hover {
    background: #f9fafb;
}

.services-table tbody tr:last-child td {
    border-bottom: none;
}

.services-table tbody td[colspan] {
    text-align: center;
    color: #6b7280;
}

.service-name {
    font-weight: 500;
    color: #1f2937;
}

.service-name-with-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f3e8ff;
    color: #7c3aed;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.price-cell {
    font-weight: 500;
    color: #1f2937;
}

/* Small Toggle Switch */
.toggle-switch-small {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

@media (max-width: 1024px) {
    .settings-overview {
        grid-template-columns: 1fr;
    }

    .settings-overview-url-text {
        white-space: normal;
        word-break: break-word;
    }

    .logo-upload-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

.toggle-switch-small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider-small:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch-small input:checked + .toggle-slider-small {
    background-color: #10b981;
}

.toggle-switch-small input:checked + .toggle-slider-small:before {
    transform: translateX(20px);
}

.toggle-switch-orange input:checked + .toggle-slider-small {
    background-color: #f59e0b;
}

.toggle-switch-green input:checked + .toggle-slider-small {
    background-color: #10b981;
}

.toggle-switch-purple input:checked + .toggle-slider-small {
    background-color: #8b5cf6;
}

/* Gider Ekle Modal */
.services-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.btn-add-service {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-service:hover {
    background: #059669;
}

.btn-add-service .btn-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.service-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.service-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.btn-remove-service {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-remove-service:hover {
    background: #fee2e2;
}

.btn-remove-service svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Gelir-Gider Takip Page */
.income-expense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 80px;
}

.income-expense-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.income-expense-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-range-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.date-range-selector .select-wrapper {
    min-width: 150px;
}

.btn-clear-filter {
    padding: 10px 16px;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-filter:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.summary-card-info {
    flex: 1;
}

.summary-card-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.summary-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.summary-card-value.red {
    color: #ef4444;
}

.summary-card-value.green {
    color: #10b981;
}

.summary-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-card-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.summary-card-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.summary-card-icon.red {
    background: #fee2e2;
    color: #ef4444;
}

.summary-card-icon.green {
    background: #d1fae5;
    color: #10b981;
}

.distribution-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.distribution-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.distribution-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.distribution-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.distribution-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.distribution-item-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.distribution-item-value {
    color: #1f2937;
    font-weight: 600;
}

.distribution-bar {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.distribution-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.income-records-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.income-records-section .section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.income-records-table {
    width: 100%;
    border-collapse: collapse;
}

.income-records-table thead {
    background: #f9fafb;
}

.income-records-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.income-records-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1f2937;
}

.income-records-table tbody tr:hover {
    background: #f9fafb;
}

.income-records-table tbody tr:last-child td {
    border-bottom: 1px solid #e5e7eb;
}

.income-records-table tfoot {
    background: #f9fafb;
}

.table-totals {
    font-weight: 600;
}

.table-totals td {
    padding: 16px;
    border-top: 2px solid #e5e7eb;
    border-bottom: none;
}

.red-text {
    color: #ef4444;
}

.green-text {
    color: #10b981;
}

.expense-records-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.expense-records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.expense-records-header .section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.expense-records-header .search-input-wrapper {
    max-width: 400px;
    width: 100%;
}

.expense-records-table {
    width: 100%;
    border-collapse: collapse;
}

.expense-records-table thead {
    background: #f9fafb;
}

.expense-records-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.expense-records-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1f2937;
}

.expense-records-table tbody tr:hover {
    background: #f9fafb;
}

.expense-records-table tbody tr:last-child td {
    border-bottom: 1px solid #e5e7eb;
}

.expense-records-table tfoot {
    background: #f9fafb;
}

.expense-records-table .table-totals td {
    padding: 16px;
    border-top: 2px solid #e5e7eb;
    border-bottom: none;
}

.date-range-summary {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.date-range-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.date-range-text {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
}

.date-range-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.date-range-summary-card {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.date-range-summary-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.date-range-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.date-range-summary-value.red-text {
    color: #ef4444;
}

.date-range-summary-value.green-text {
    color: #10b981;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .navbar {
        left: 0;
    }

    .modal-dialog {
        max-width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-overlay {
        padding: 0;
    }

    .expense-records-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .expense-records-header .search-input-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .date-range-summary-cards {
        grid-template-columns: 1fr;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .distribution-section {
        grid-template-columns: 1fr;
    }

    .operation-toggle-group {
        flex-direction: column;
    }

    .operation-toggle-btn {
        width: 100%;
    }

    .stock-operation-card,
    .current-stocks-card {
        padding: 20px;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .navbar {
        left: 0 !important;
        padding: 10px 15px;
    }
    
    .navbar-brand {
        display: flex;
        align-items: center;
    }
    
    .navbar-brand h1 {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 22px;
        margin: 0;
    }

    .user-info {
        display: none;
    }

    .page-header, .appointment-header, .stock-management-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-top: 60px;
    }

    .appointment-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .mobile-close-btn {
        display: block;
        margin-left: auto;
    }

    /* App shell: hide desktop navbar (duplicated later for clarity; ensures order if CSS is partially cached) */
    .navbar {
        display: none !important;
    }
}

/* Stock Management Styles */
.stock-management-header {
    margin-bottom: 30px;
    margin-top: 80px;
}

.stock-management-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.stock-operation-card,
.current-stocks-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.stock-operation-title,
.current-stocks-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 24px 0;
}

.operation-toggle-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.operation-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #6b7280;
}

.operation-toggle-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.operation-toggle-btn.active {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.operation-toggle-btn-remove.active {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
}

.toggle-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.stock-operation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stock-operation-form .form-actions {
    margin-top: 0;
    justify-content: flex-start;
}

.btn-stock-add {
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-stock-add:hover {
    background: #059669;
}

.btn-stock-remove {
    padding: 12px 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-stock-remove:hover {
    background: #dc2626;
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-table thead {
    background: #f9fafb;
}

.stock-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.stock-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1f2937;
}

.stock-table tbody tr:hover {
    background: #f9fafb;
}

.stock-table tbody tr:last-child td {
    border-bottom: none;
}

.btn-logout {
    background-color: #dc3545; /* indiki qÄ±rmÄ±zÄ± */
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: #c82333;
}

.nav-item-logout {
    background: none;
    border: none;
    width: 100%;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ebc7c7;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: all 0.2s ease;
}

.nav-item-logout:hover {
    background-color: rgba(235, 199, 199, 0.1);
    color: #f0dada;
}

.form-error {
    margin-top: 4px;
    font-size: 12px;
    color: #e53935;
}

.has-error {
    border-color: #e53935;
}

/* ÃœrÃ¼n ve Hizmet YÃ¶netimi */
.product-service-page {
    margin-top: 80px;
    padding-bottom: 24px;
}

.product-service-header {
    margin-bottom: 24px;
}

.product-service-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.product-service-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.product-service-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.product-service-tab {
    padding: 12px 20px;
    background: transparent;
    color: #6b7280;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
    text-decoration: none;
    font-family: inherit;
}

.product-service-tab:hover {
    color: #3b82f6;
}

.product-service-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.product-service-tab-link.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.product-service-content {
    background: white;
    border-radius: 12px;
    padding: 24px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-service-tab-pane {
    display: none;
}

.product-service-tab-pane.active {
    display: block;
}

.product-service-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.product-service-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.product-service-section-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

.stock-mv-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.stock-mv-in {
    background: #dcfce7;
    color: #15803d;
}

.stock-mv-out {
    background: #fee2e2;
    color: #b91c1c;
}

.stock-movement-table td {
    font-size: 14px;
    vertical-align: middle;
}

.btn-new-product {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-new-product:hover {
    background: #2563eb;
}

.btn-new-product .btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.product-service-table.data-table th {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
}

.product-service-table.data-table td {
    padding: 16px;
    vertical-align: middle;
}

.product-service-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-family: inherit;
}

.btn-action svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-action-edit {
    background: #eab308;
    color: #1f2937;
}

.btn-action-edit:hover {
    background: #ca8a04;
    color: #1f2937;
}

.btn-action-print {
    background: #10b981;
    color: white;
}

.btn-action-print:hover {
    background: #059669;
}

.btn-action-view {
    background: #3b82f6;
    color: white;
}

.btn-action-view:hover {
    background: #2563eb;
}

.btn-action-delete {
    background: #ef4444;
    color: white;
}

.btn-action-delete:hover {
    background: #dc2626;
}

/* Hizmetler table */
.hizmet-table.data-table th,
.hizmet-table.data-table td {
    padding: 14px 16px;
}

.hizmet-table .price-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.product-service-actions-sm {
    gap: 6px;
}

/* Stok YÃ¶netimi: + / - action buttons */
.stok-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action-stok-plus {
    background: #10b981;
    color: white;
}

.btn-action-stok-plus:hover {
    background: #059669;
}

.btn-action-stok-minus {
    background: #ef4444;
    color: white;
}

.btn-action-stok-minus:hover {
    background: #dc2626;
}

.stok-row-critical {
    background: #fff7ed;
}

.stok-row-critical td:first-child {
    box-shadow: inset 3px 0 0 #f97316;
}

.stok-kritik-banner {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 14px;
    font-weight: 600;
}

.product-service-tab[disabled] {
    cursor: default;
    opacity: 1;
}

/* Stok Ekle / Stok Ã‡Ä±kar modals */
.stok-modal-body {
    padding: 24px 32px 32px;
}

.stok-modal-info {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.stok-modal-urun {
    font-size: 15px;
    color: #4b5563;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.stok-modal-mevcut-box {
    display: inline-block;
    padding: 12px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stok-modal-mevcut-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stok-modal-mevcut-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
}

.stok-modal-body .form-group {
    margin-bottom: 24px;
}

.stok-modal-body .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    padding-top: 0;
}

/* Mobile App Overhaul */
.global-mobile-header {
    display: none;
}
.bottom-nav {
    display: none;
}

/* Dashboard: mobile vs desktop panels (avoid inline <style> in templates) */
.mobile-dashboard {
    display: none;
}
.desktop-dashboard {
    display: block;
}

/* Mobile header / search icons: HTML intrinsic size + layout guardrails */
.global-mobile-header .mobile-app-avatar {
    overflow: hidden;
    flex-shrink: 0;
}
.global-mobile-header .mobile-app-avatar svg {
    width: 28px;
    height: 28px;
    max-width: 100%;
    max-height: 100%;
    display: block;
    flex-shrink: 0;
}
.mobile-dashboard .mobile-search svg {
    width: 20px;
    height: 20px;
    max-width: 24px;
    max-height: 24px;
    display: block;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .sidebar {
        left: 0;
        top: 0;
        bottom: 0;
        border-radius: 0;
        transform: translateX(-100%);
        width: 280px;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
        padding-bottom: 90px !important;
    }

    .global-mobile-header {
        display: flex;
    }
    .navbar {
        display: none !important;
    }
    .main-content {
        padding-top: 20px !important;
        padding-bottom: 90px !important;
    }

    /* .bottom-nav köhnə layihədir; mobil üçün .mobile-bottom-nav istifadə olunur */

    /* Mobile App Dashboard */
    .mobile-dashboard {
        display: block;
        padding: 0 10px;
    }

    .desktop-dashboard {
        display: none;
    }

    .mobile-header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .mobile-app-greeting {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-app-avatar {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        border: 2px solid #3b82f6;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #cbd5e1;
        background: #f8fafc;
    }

    .mobile-app-avatar svg {
        width: 28px;
        height: 28px;
    }

    .mobile-greeting-text h2 {
        font-size: 18px;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
    }

    .mobile-greeting-text p {
        font-size: 12px;
        color: #64748b;
        margin: 2px 0 0 0;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        background: #3b82f6;
        border-radius: 30px;
        padding: 6px;
        gap: 6px;
    }

    .mobile-action-btn {
        background: transparent;
        border: none;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
    }

    .mobile-action-btn.light {
        background: white;
        color: #1e293b;
    }

    .mobile-search {
        position: relative;
        margin-bottom: 24px;
    }

    .mobile-search input {
        width: 100%;
        padding: 14px 16px 14px 44px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        font-size: 14px;
        color: #475569;
        background: #fff;
    }
    
    .mobile-search input:focus {
        outline: none;
        border-color: #3b82f6;
    }

    .mobile-search svg {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #3b82f6;
        width: 20px;
        height: 20px;
    }

    .mobile-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
    }

    .mobile-section-header h3 {
        font-size: 18px;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
    }

    .mobile-btn-link {
        color: #3b82f6;
        text-decoration: none;
        font-size: 13px;
        font-weight: 600;
        background: #eff6ff; 
        padding: 6px 12px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-quick-actions {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding-bottom: 12px;
        margin-bottom: 24px;
        scrollbar-width: none;
    }
    
    .mobile-quick-actions::-webkit-scrollbar {
        display: none;
    }

    .mobile-quick-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 80px;
        gap: 8px;
        text-decoration: none;
    }

    .mobile-quick-action .icon-circle {
        width: 60px;
        height: 60px;
        background: #eff6ff;
        color: #3b82f6;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-quick-action .icon-circle svg {
        width: 26px;
        height: 26px;
    }

    .mobile-quick-action span {
        font-size: 13px;
        color: #475569;
        text-align: center;
        font-weight: 500;
        white-space: nowrap;
    }

    .mobile-upcoming-card {
        background: #fff;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.04);
        margin-bottom: 20px;
        border: 1px solid #f1f5f9;
        min-height: 200px;
    }

    .mobile-upcoming-item {
        display: flex;
        align-items: center;
        padding: 16px 0;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .mobile-upcoming-item:last-child {
        border-bottom: none;
    }

    .mobile-time {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        width: 85px;
        color: #3b82f6;
    }
    
    .mobile-time-info {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-time-info .hour {
        font-weight: 700;
        font-size: 15px;
    }
    
    .mobile-time-info .date {
        font-size: 11px;
        color: #94a3b8;
    }

    .mobile-patient {
        flex: 1;
        font-weight: 600;
        font-size: 15px;
        color: #1e293b;
        padding: 0 10px;
    }

    .mobile-badge {
        padding: 6px 14px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-badge.success {
        background: #f0fdf4;
        color: #16a34a;
        border: 1px solid #bbf7d0;
    }
}

/* Floating Action Button (FAB) */
.fab-container {
    position: fixed;
    right: 30px;
    bottom: 100px; /* Above bottom nav */
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fab-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.5);
}

.fab-button svg {
    width: 28px;
    height: 28px;
}

.fab-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.fab-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fab-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--slate-800);
    border-radius: 12px;
    transition: all 0.2s ease;
    gap: 16px;
}

.fab-menu-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-icon svg {
    width: 20px;
    height: 20px;
}

.patient-icon { background: #eff6ff; color: #3b82f6; }
.appointment-icon { background: #f0fdf4; color: #22c55e; }
.operation-icon { background: #fffbeb; color: #f59e0b; }
.document-icon { background: #eff6ff; color: #3b82f6; }
.holiday-icon { background: #fef2f2; color: #ef4444; }

.item-label {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.chevron-icon {
    width: 18px;
    height: 18px;
    color: #cbd5e1;
}

.fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 1099;
    display: none;
}

.fab-overlay.show {
    display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .fab-container {
        bottom: 90px;
        right: 20px;
    }
    
    .fab-menu {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
}


/* Mobile Calendar Fixes */
@media (max-width: 768px) {
    .calendar-days {
        min-width: 0 !important;
        width: 100%;
    }
    
    .calendar-time-column {
        width: 70px;
    }

    .time-slot, .day-header, .time-column-header-spacer {
        padding: 4px;
        font-size: 11px;
    }
}

/* Desktop Dashboard Upcoming Section */
.desktop-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.btn-link {
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.desktop-upcoming-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.desktop-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.desktop-upcoming-item {
    display: grid;
    grid-template-columns: 120px 1fr 1fr 100px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.desktop-upcoming-item:hover {
    background: rgba(241, 245, 249, 0.5);
}

.item-time {
    display: flex;
    flex-direction: column;
}

.item-time .hour {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.item-time .date {
    font-size: 0.75rem;
    color: #64748b;
}

.item-patient {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.item-doctor {
    font-size: 0.875rem;
    color: #64748b;
}

.item-badge {
    justify-self: end;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-badge.success {
    background: #ecfdf5;
    color: #059669;
}
