/* ============================================
   VetoTakip - Minimal & Professional Design
   ============================================ */

/* ============================================
   LIGHT MODE (Default)
   ============================================ */
:root {
    --primary: var(--brand-color, #4f46e5);
    --primary-light: color-mix(in srgb, var(--brand-color, #4f46e5) 70%, white);
    --primary-dark: color-mix(in srgb, var(--brand-color, #4f46e5) 70%, black);
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --white: #ffffff;
    --black: #000000;
    
    /* Semantic Colors */
    --bg-body: var(--gray-50);
    --bg-card: var(--white);
    --bg-sidebar: var(--white);
    --bg-header: rgba(255, 255, 255, 0.95);
    --bg-input: var(--gray-50);
    --bg-hover: var(--gray-100);
    --bg-active: #eef2ff;
    
    --text-primary: var(--gray-800);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --text-light: var(--gray-400);
    
    --border-color: var(--gray-200);
    --border-light: var(--gray-100);
    
    --sidebar-width: 240px;
    --header-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
    
    --white: #1e293b;
    --black: #f8fafc;
    
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-header: rgba(30, 41, 59, 0.95);
    --bg-input: #0f172a;
    --bg-hover: #334155;
    --bg-active: #312e81;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --border-color: #334155;
    --border-light: #1e293b;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.4);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

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

/* ============================================
   Sidebar - Clean & Minimal
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Sidebar Collapse Button */
.sidebar-collapse-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    z-index: 10;
}
.sidebar-collapse-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: 70px;
}
.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
}
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-logo + h1 {
    display: none;
}
.sidebar.collapsed .sidebar-logo {
    font-size: 24px !important;
    max-height: 30px !important;
    max-width: 40px !important;
}
.sidebar.collapsed .menu-label span,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .menu-arrow {
    display: none;
}
.sidebar.collapsed .menu-label,
.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px;
}
.sidebar.collapsed .menu-label i,
.sidebar.collapsed .menu-item i {
    margin-right: 0;
    font-size: 18px;
}
.sidebar.collapsed .menu-items {
    display: none;
}
.sidebar.collapsed .menu-group.open .menu-items {
    display: none;
}
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user-name,
.sidebar.collapsed .sidebar-user-role {
    display: none;
}
.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 12px;
}

/* Hover tooltip for collapsed sidebar */
.sidebar.collapsed .menu-item:hover::after,
.sidebar.collapsed .menu-label:hover::after {
    content: attr(title);
    position: absolute;
    left: 75px;
    background: var(--gray-800);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}
.sidebar.collapsed .menu-item,
.sidebar.collapsed .menu-label {
    position: relative;
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header i {
    font-size: 24px;
    color: var(--primary);
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

/* Sidebar User Info */
.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-hover);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

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

.sidebar-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Menu Group - Collapsible */
.menu-group {
    margin-bottom: 4px;
}

/* Tek başına menü öğeleri (Dashboard, Randevular) */
.menu-item-single {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 600;
    margin-bottom: 4px;
    background: var(--bg-hover);
}

.menu-item-single i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--primary);
}

.menu-item-single:hover {
    background: var(--primary);
    color: white;
}

.menu-item-single:hover i {
    color: white;
}

.menu-item-single.active {
    background: var(--primary);
    color: white;
}

.menu-item-single.active i {
    color: white;
}

/* Menü ayırıcı çizgi */
.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 12px;
    opacity: 0.5;
}

.menu-group .menu-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    user-select: none;
    margin-bottom: 2px;
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.menu-group .menu-label:hover {
    background: var(--bg-active);
    color: var(--text-primary);
}

.menu-group.open .menu-label {
    color: var(--primary);
    background: rgba(var(--brand-color-rgb), 0.1);
}

.menu-group .menu-label span i {
    color: var(--text-muted);
}

.menu-group.open .menu-label span i {
    color: var(--primary);
}

.menu-group .menu-label span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-group .menu-label span i {
    font-size: 13px;
    width: 18px;
    text-align: center;
}

.menu-group .menu-label .menu-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.menu-group.open .menu-label .menu-arrow {
    transform: rotate(180deg);
}

/* Menu Items Container */
.menu-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 12px;
    margin-left: 3px;
    border-left: 1px dashed var(--border-color);
}

.menu-group.open .menu-items {
    max-height: 600px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 2px;
}

.menu-item i {
    width: 18px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--primary);
    color: var(--white);
}

.menu-item.active i {
    opacity: 1;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ============================================
   Header - Minimal Top Bar
   ============================================ */
.header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-title p {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search {
    position: relative;
    width: 280px;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.header-search input::placeholder {
    color: var(--text-light);
}

.header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: transparent;
    border: none;
    border: none;
}

.header-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.header-icon .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.user-menu-wrapper {
    position: relative;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-menu:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.user-menu .dropdown-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.user-dropdown.show + .user-menu .dropdown-arrow,
.user-menu-wrapper:has(.user-dropdown.show) .dropdown-arrow {
    transform: rotate(180deg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .role {
    font-size: 11px;
    color: var(--text-light);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 8px;
    min-width: 200px;
    z-index: 1001;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.15s;
}

.user-dropdown .dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-dropdown .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.user-dropdown .dropdown-item.logout {
    color: var(--danger);
}

.user-dropdown .dropdown-item.logout:hover {
    background: #fef2f2;
    color: var(--danger);
}

[data-theme="dark"] .user-dropdown .dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ============================================
   Page Content
   ============================================ */
.page-content {
    padding: 32px;
}

/* ============================================
   Cards - Clean Design
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--text-light);
    font-size: 14px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-body);
}

/* ============================================
   Stats Grid - Minimal Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }
.stat-icon.orange { background: #fffbeb; color: #f59e0b; }
.stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.stat-icon.red { background: #fef2f2; color: #ef4444; }

.stat-info h4 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   Tables - Clean & Readable
   ============================================ */
.table-container {
    overflow-x: auto;
}

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

thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
}

tbody tr:hover {
    background: var(--bg-hover);
}

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

/* ============================================
   Buttons - Minimal Style
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-light);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
}

/* ============================================
   Forms - Clean Inputs
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    transition: var(--transition);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: var(--bg-card);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}
.form-row > .form-group {
    padding: 0 8px;
}
.form-row > .col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.form-row > .col-3 { flex: 0 0 25%; max-width: 25%; }
.form-row > .col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.form-row > .col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.form-row > .col-6 { flex: 0 0 50%; max-width: 50%; }
.form-row > .col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.form-row > .col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.form-row > .col-9 { flex: 0 0 75%; max-width: 75%; }
.form-row > .col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.form-row > .col-12 { flex: 0 0 100%; max-width: 100%; }

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   Badges - Subtle Style
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-primary { background: #eef2ff; color: #4f46e5; }
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-info { background: #f0f9ff; color: #0284c7; }
.badge-secondary { background: var(--bg-hover); color: var(--text-secondary); }

[data-theme="dark"] .badge-primary { background: #312e81; color: #a5b4fc; }
[data-theme="dark"] .badge-success { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-warning { background: #78350f; color: #fcd34d; }
[data-theme="dark"] .badge-danger { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .badge-info { background: #0c4a6e; color: #7dd3fc; }

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #f0f9ff;
    color: #075985;
    border: 1px solid #bae6fd;
}

[data-theme="dark"] .alert-success { background: #064e3b; color: #6ee7b7; border-color: #065f46; }
[data-theme="dark"] .alert-danger { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .alert-warning { background: #78350f; color: #fcd34d; border-color: #92400e; }
[data-theme="dark"] .alert-info { background: #0c4a6e; color: #7dd3fc; border-color: #075985; }

/* ============================================
   Modal - Clean Overlay
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-body);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination a {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--bg-hover);
}

.pagination a.active {
    background: var(--primary);
    color: #ffffff;
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

/* ============================================
   Utilities
   ============================================ */
.d-flex { display: flex; }
.d-none { display: none; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.p-3 { padding: 16px; }
.p-4 { padding: 24px; }

.w-full { width: 100%; }
.rounded { border-radius: var(--radius-md); }

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* ============================================
   TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .header {
        padding: 0 20px;
    }
    
    .header-search {
        width: 200px;
    }
    
    .page-content {
        padding: 24px 20px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 700px;
    }
    
    /* Cards Grid */
    .card-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row.col-3,
    .form-row.col-4 {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Create Page Grid */
    .create-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Modal */
    .modal-content {
        width: 90%;
        max-width: 600px;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    /* User Menu */
    .user-info {
        display: none;
    }
    
    .user-dropdown {
        right: 20px !important;
    }
}

/* ============================================
   MOBILE LANDSCAPE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 56px;
    }
    
    .header-search {
        display: none;
    }
    
    .header-title h2 {
        font-size: 16px;
    }
    
    .header-title p {
        display: none;
    }
    
    .page-content {
        padding: 16px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .stat-card h3 {
        font-size: 20px;
    }
    
    .stat-card p {
        font-size: 11px;
    }
    
    /* Cards */
    .card {
        border-radius: var(--radius-md);
    }
    
    .card-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-header h3 {
        font-size: 14px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
        margin: 0;
    }
    .form-row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    
    /* Page Header */
    .d-flex.justify-between {
        flex-direction: column;
        gap: 16px;
        align-items: stretch !important;
    }
    
    .d-flex.justify-between .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Tables - Card Layout */
    .table-container {
        border: none;
        background: transparent;
    }
    
    table {
        min-width: auto;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        display: block;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 12px;
    }
    
    table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
    }
    
    table tbody td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        padding-top: 12px;
    }
    
    table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-600);
        font-size: 12px;
        text-transform: uppercase;
    }
    
    /* Badges */
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Modal */
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    /* Empty State */
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state i {
        font-size: 48px;
    }
    
    .empty-state h4 {
        font-size: 16px;
    }
    
    /* Alerts */
    .alert {
        padding: 12px;
        font-size: 13px;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .btn {
        padding: 8px 12px;
    }
    
    /* Create Page */
    .page-header-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .page-header-bar .submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-card-header {
        padding: 14px 16px;
    }
    
    .form-card-body {
        padding: 16px;
    }
    
    /* Pet Cards */
    .pet-card-content {
        padding: 12px;
    }
    
    .health-box,
    .clinic-box {
        padding: 10px;
    }
    
    .health-checks {
        gap: 6px;
    }
    
    .health-check {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* Notification Options */
    .notification-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .notif-check {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   MOBILE PORTRAIT (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .header {
        padding: 0 12px;
    }
    
    .page-content {
        padding: 12px;
    }
    
    /* Stats - Single Column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .stat-card .icon {
        order: 2;
    }
    
    .stat-card .info {
        order: 1;
    }
    
    /* Sidebar */
    .sidebar {
        width: 100%;
    }
    
    .sidebar-header {
        padding: 16px;
    }
    
    .sidebar-menu {
        padding: 12px 8px;
    }
    
    .menu-item {
        padding: 12px;
    }
    
    /* Cards */
    .card-header {
        padding: 12px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    /* Tables as Cards */
    table tbody tr {
        padding: 10px;
    }
    
    table tbody td {
        font-size: 13px;
    }
    
    /* Buttons Stack */
    .btn-group,
    .d-flex.gap-2 {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn,
    .d-flex.gap-2 .btn {
        width: 100%;
    }
    
    /* Invoice Summary */
    .invoice-stats {
        grid-template-columns: 1fr;
    }
    
    /* Form Card */
    .form-card-header {
        flex-wrap: wrap;
    }
    
    .form-card-header .actions {
        width: 100%;
        margin-top: 12px;
    }
    
    .form-card-header .actions .btn {
        width: 100%;
    }
    
    /* Pet Card Head */
    .pet-card-head {
        padding: 10px 12px;
    }
    
    /* Collapsible */
    .collapsible-toggle {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .collapsible-body {
        padding: 12px;
    }
    
    /* Add Pet Button */
    .add-pet-btn {
        padding: 12px;
        font-size: 13px;
    }
    
    /* Search in header (if visible) */
    .header-search {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        width: 100%;
        padding: 12px;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        display: none;
    }
    
    .header-search.active {
        display: block;
    }
    
    .header-search input {
        width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .header,
    .mobile-menu-toggle,
    .btn,
    .modal,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .page-content {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        background: white !important;
        font-size: 12pt;
    }
    
    table {
        min-width: auto !important;
    }
    
    table thead {
        display: table-header-group !important;
    }
    
    table tbody tr {
        display: table-row !important;
        page-break-inside: avoid;
    }
    
    table tbody td {
        display: table-cell !important;
    }
    
    table tbody td::before {
        display: none !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .menu-item {
        padding: 14px 12px;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch */
    .menu-item:hover,
    .btn:hover,
    .card:hover {
        transform: none;
    }
    
    /* Active states for touch */
    .menu-item:active {
        background: var(--gray-100);
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .page-content {
        padding: 12px;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode */
    /*
    :root {
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
        --white: #1e293b;
        --black: #f8fafc;
    }
    */
}

/* =====================================================
   DEFINITIONS (TANIMLAMALAR) STYLES
   ===================================================== */

/* Filter Chips */
.filter-chips,
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip input[type="checkbox"] {
    display: none;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-chip.active i {
    color: white;
}

.filter-chip i {
    font-size: 0.85rem;
}

/* Pet Type Badge */
.pet-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pet-type-badge.all-types {
    background: var(--primary)10;
    border-color: var(--primary);
    color: var(--primary);
}

.definitions-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
}

.definitions-container-wide {
    grid-template-columns: 450px 1fr;
}

.definitions-container-full {
    grid-template-columns: 1fr;
    gap: 24px;
}

.definition-form-card,
.definition-list-card {
    height: fit-content;
}

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

.definition-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.definition-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-body);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.definition-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.definition-item-vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.definition-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.definition-item-content {
    padding: 12px;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 0.85rem;
}

.definition-item-content code {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.definition-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.definition-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.definition-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.definition-item-info strong {
    font-weight: 600;
    color: var(--text-primary);
}

.definition-item-info small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.definition-item-indent {
    margin-left: 20px;
}

.definition-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.definition-group-header:first-child {
    margin-top: 0;
}

.definition-group-header i {
    color: var(--primary);
}

.definition-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.definition-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.definition-description {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.definition-actions {
    display: flex;
    gap: 6px;
}

/* Color Badge */
.color-badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Icon Badge */
.icon-badge {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.icon-badge-lg {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #10b98120;
    color: #10b981;
}

.status-badge.inactive {
    background: #64748b20;
    color: #64748b;
}

/* Count Badge */
.count-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-muted);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Discount Badge */
.discount-badge {
    padding: 2px 8px;
    background: #10b98120;
    color: #10b981;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Type Badge */
.type-badge {
    padding: 2px 8px;
    background: var(--bg-muted);
    color: var(--text-muted);
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Health Warning Badge */
.health-warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Exam Type Badge */
.exam-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Icon Preview */
.icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-muted);
    border-radius: 8px;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* Warning Preview */
.warning-preview,
.exam-type-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-muted);
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Variables Helper */
.variables-helper {
    padding: 12px;
    background: var(--bg-muted);
    border-radius: 8px;
    margin-bottom: 8px;
}

.variables-helper label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.variable-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.variable-tag {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.variable-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: var(--bg-muted);
    border-radius: 8px;
}

.checkbox-group .checkbox-label {
    margin: 0;
}

.checkbox-group .checkbox-label span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Form Control Color */
.form-control-color {
    width: 60px;
    height: 40px;
    padding: 4px;
    cursor: pointer;
}

/* Card Header Actions */
.card-header-actions {
    display: flex;
    gap: 8px;
}

.card-header-actions .form-control-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: 150px;
}

/* Exam Templates Grid */
.exam-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.exam-template-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.exam-template-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.exam-template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-color);
}

.exam-template-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-template-title h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

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

.exam-template-body {
    padding: 16px;
}

.exam-template-section {
    margin-bottom: 12px;
}

.exam-template-section:last-child {
    margin-bottom: 0;
}

.exam-template-section label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.exam-template-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
}

/* Responsive Definitions */
@media (max-width: 1024px) {
    .definitions-container,
    .definitions-container-wide {
        grid-template-columns: 1fr;
    }
    
    .definition-list {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .definition-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .definition-item-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    .exam-templates-grid {
        grid-template-columns: 1fr;
    }
}


