/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00072D;
    --primary-light: #001A5C;
    --primary-dark: #000514;
    --secondary: #f5f5f5;
    --accent: #FF8B00;
    --accent-hover: #E67A00;
    --accent-light: #FFA533;
    --text-primary: #0a0a0a;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --bg: #ffffff;
    --bg-secondary: #fafafa;
    --bg-hover: #f9fafb;
    --success: #10b981;
    --warning: #FF8B00;
    --danger: #ef4444;
    --info: #00072D;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --sidebar-width: 240px;
    --header-height: 72px;
}

[data-theme="dark"] {
    --primary: #ffffff;
    --primary-light: #e5e5e5;
    --primary-dark: #00072D;
    --secondary: #1a1a1a;
    --accent: #FF8B00;
    --accent-hover: #FFA533;
    --accent-light: #FFB866;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --border: #374151;
    --border-light: #4b5563;
    --bg: #111827;
    --bg-secondary: #1f2937;
    --bg-hover: #374151;
    --success: #10b981;
    --warning: #FF8B00;
    --danger: #ef4444;
    --info: #001A5C;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg);
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

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

.logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-group {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-group-title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    padding: 14px 12px 8px;
    margin-top: 4px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s, background 0.2s;
    border-radius: 6px;
}
.nav-group-title:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.nav-group:first-child .nav-group-title {
    margin-top: 0;
    padding-top: 0;
}

.nav-group-chevron {
    font-size: 10px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.nav-group.collapsed .nav-group-chevron {
    transform: rotate(-90deg);
}

.nav-group-items {
    list-style: none;
    padding: 0 0 4px 0;
    margin: 0;
    overflow: hidden;
    max-height: 800px;
    transition: max-height 0.25s ease-out;
}
.nav-group.collapsed .nav-group-items {
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active .nav-link {
    background: var(--primary);
    color: #ffffff;
}

[data-theme="dark"] .nav-item.active .nav-link {
    background: var(--accent);
    color: #ffffff;
}

.nav-link i {
    width: 20px;
    font-size: 18px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Header */
.top-header {
    background: var(--bg);
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .top-header {
    background: rgba(17, 24, 39, 0.8);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .sidebar {
    background: var(--bg);
    border-right-color: var(--border);
}

[data-theme="dark"] .sidebar-header {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .content-card {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .stat-card {
    background: var(--bg);
    border-color: var(--border);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: var(--bg-hover);
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

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

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

.header-search-wrapper {
    position: relative;
}

.header-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 360px;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    display: none;
    padding: 8px 0;
}
.header-search-dropdown.active {
    display: block;
}
.header-search-group {
    padding: 6px 12px 8px;
    border-bottom: 1px solid var(--border-light);
}
.header-search-group:last-of-type {
    border-bottom: none;
}
.header-search-group-title {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 6px;
    padding-left: 2px;
}
.header-search-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.header-search-group-icon i {
    font-size: 14px;
    display: block;
    text-align: center;
    line-height: 1;
}
.header-search-group-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-search-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.header-search-item {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.header-search-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}
.header-search-all {
    display: block;
    padding: 10px 14px;
    margin-top: 4px;
    margin-left: 12px;
    margin-right: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    background: rgba(255, 139, 0, 0.08);
    transition: background 0.15s ease;
}
.header-search-all:hover {
    background: rgba(255, 139, 0, 0.15);
}
.header-search-empty {
    padding: 16px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    font-size: 14px;
}

.search-box input {
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    width: 320px;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

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

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

.lang-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.lang-switcher .lang-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.lang-switcher .lang-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.lang-switcher .lang-btn.active {
    background: var(--primary);
    color: #fff;
}

[data-theme="dark"] .lang-switcher .lang-btn.active {
    background: var(--accent);
    color: #fff;
}

.icon-btn {
    position: relative;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

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

.icon-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-avatar-circle {
    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: 14px;
}

[data-theme="dark"] .user-avatar-circle {
    background: var(--accent);
    color: white;
}

.user-avatar-circle.large {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

/* Notification & User Dropdowns */
.notification-wrapper,
.user-profile-wrapper {
    position: relative;
}

.notification-dropdown,
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    pointer-events: none;
}

.notification-dropdown.active,
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown {
    width: 280px;
}

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

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

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

.mark-all-read {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.mark-all-read:hover {
    background: var(--bg-hover);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.user-name-dropdown {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.dropdown-content {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: var(--bg-secondary);
}

.notification-item.unread .notification-title {
    font-weight: 600;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    flex-shrink: 0;
}

.notification-item.unread .notification-icon {
    background: var(--accent);
    color: white;
}

.notification-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-light);
}

/* Toast / yan bildirim konteyneri (Cihaz eklendi, Fatura kaydedildi vb.) */
.notification-container {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}

.notification-container .notification-item {
    pointer-events: auto;
    border-bottom: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    align-items: center;
}

.notification-container .notification-item .icon {
    flex-shrink: 0;
    font-size: 18px;
}

.notification-container .notification-item .message {
    flex: 1;
    font-size: 14px;
}

.notification-container .notification-item .close-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary);
}

.notification-container .notification-success .icon { color: var(--success); }
.notification-container .notification-error .icon { color: var(--danger); }
.notification-container .notification-warning .icon { color: var(--warning); }

.dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.view-all {
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all:hover {
    color: var(--accent-hover);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item i {
    width: 18px;
    font-size: 16px;
    color: var(--text-secondary);
    text-align: center;
}

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

/* Theme Toggle - New Design */
.theme-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

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

.theme-toggle-icon {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle-item:hover .theme-toggle-icon {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.theme-toggle-icon i {
    position: absolute;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon-light {
    color: #f59e0b;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-icon-dark {
    color: var(--accent);
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-icon-light {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle-text {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    min-width: 70px;
}

.theme-toggle-text span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    line-height: 1;
    position: absolute;
    white-space: nowrap;
}

.theme-text-light {
    opacity: 1;
    transform: translateX(0);
}

.theme-text-dark {
    opacity: 0;
    transform: translateX(-8px);
}

[data-theme="dark"] .theme-text-light {
    opacity: 0;
    transform: translateX(8px);
}

[data-theme="dark"] .theme-text-dark {
    opacity: 1;
    transform: translateX(0);
}

/* Dropdown overlay for closing on outside click */
/* Content Area */
.content-area {
    padding: 32px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.quick-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.quick-action-btn.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quick-action-btn.primary:hover {
    background: var(--primary-light);
}

[data-theme="dark"] .quick-action-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
}

[data-theme="dark"] .quick-action-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.quick-action-btn i {
    font-size: 16px;
}

a.quick-action-btn {
    text-decoration: none;
}

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

.quick-actions-group label {
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-actions-group select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
}

.pagination-bar button {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
}

.pagination-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-bar .pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Okunmamış e-posta satırı */
.email-unread {
    font-weight: 700;
    background: rgba(59, 130, 246, 0.06);
}
.email-unread td {
    color: var(--text-primary);
}
.email-unread .email-col-read i {
    color: var(--primary);
}
[data-theme="dark"] .email-unread {
    background: rgba(59, 130, 246, 0.10);
}

/* Hesap etiket rengi badge */
.email-account-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--account-color, var(--text-secondary));
    background: rgba(107, 114, 128, 0.12);
    background: color-mix(in srgb, var(--account-color, #6b7280) 12%, transparent);
    white-space: nowrap;
}

.email-row-clickable {
    cursor: pointer;
}

#emailsTableBody .email-row-clickable,
#emailsTableBody .email-row-clickable * {
    text-decoration: none;
}

.email-body-html {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

/* Email detail sayfalarında (email_detail, email_sent_detail) mail gövdesi */
.email-detail-page .email-detail__body-inner.email-body-html {
    max-width: 100%;
    max-height: 900px;
    width: 100%;
    box-sizing: border-box;
}

.email-body-html img { max-width: 100%; height: auto; }

.email-date-rel { cursor: help; }

.email-col-read { width: 1%; white-space: nowrap; text-align: center; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

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

.stat-card.warning-card {
    border-color: var(--warning);
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

[data-theme="dark"] .stat-card.warning-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
}

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

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
}

.warning-card .stat-icon {
    background: var(--warning);
    color: white;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.content-card {
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.content-card:hover {
    box-shadow: var(--shadow-md);
}

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

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

.card-title i {
    color: var(--text-secondary);
    font-size: 16px;
}

.emails-account-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.card-action {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.card-action:hover {
    background: var(--bg-hover);
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-action-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.card-action-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

[data-theme="dark"] .card-action-btn {
    background: var(--accent);
}

[data-theme="dark"] .card-action-btn:hover {
    background: var(--accent-hover);
}

.card-body {
    padding: 24px;
}

/* Daily Notes */
.daily-notes-card {
    grid-column: span 2;
}

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

.note-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.note-time {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    min-width: 50px;
    padding-top: 2px;
}

.note-content {
    flex: 1;
}

.note-content p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.note-delete-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.note-delete-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.priority-badge.low { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.priority-badge.medium { background: rgba(255, 139, 0, 0.15); color: var(--warning); }
.priority-badge.high { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.note-input-container {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.note-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: var(--bg);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.note-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.note-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-light);
}

[data-theme="dark"] .btn-primary {
    background: var(--accent);
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--accent-hover);
}

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

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

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-danger:hover {
    background: #dc2626;
    opacity: 0.9;
}

[data-theme="dark"] .btn-danger {
    background: var(--danger);
    color: white;
}

[data-theme="dark"] .btn-danger:hover {
    background: #f87171;
}

/* Rental List */
.rental-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.rental-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.rental-info {
    flex: 1;
}

.rental-customer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rental-customer strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.rental-serial {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.rental-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.rental-date i {
    font-size: 11px;
}

.rental-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 6px;
}

.rental-status.urgent {
    color: var(--warning);
    background: #fff7ed;
}

/* Call List */
.call-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.call-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.call-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: 13px;
    flex-shrink: 0;
}

[data-theme="dark"] .call-avatar {
    background: var(--accent);
    color: white;
}

.call-content {
    flex: 1;
}

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

.call-header strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.call-time {
    font-size: 12px;
    color: var(--text-light);
}

.call-note {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

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

.tag {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--bg);
    color: var(--text-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    font-weight: 500;
}

/* Relationship List */
.relationship-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.relationship-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.relationship-customer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.customer-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: 13px;
    flex-shrink: 0;
}

[data-theme="dark"] .customer-avatar {
    background: var(--accent);
    color: white;
}

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

.customer-info strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.customer-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.relationship-product {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.relationship-product i {
    color: var(--text-light);
    font-size: 12px;
}

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

.product-info strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Monaco', 'Courier New', monospace;
}

.product-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Device Status Grid */
.device-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.status-card {
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.status-card:hover {
    box-shadow: var(--shadow-md);
}

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

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-card.available .status-indicator {
    background: var(--success);
}

.status-card.maintenance .status-indicator {
    background: var(--warning);
}

.status-card.pending .status-indicator {
    background: var(--danger);
}

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

.status-count {
    padding: 20px;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.status-list {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.status-serial {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.status-action {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: none;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.status-action:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Tasks */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.task-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.task-checkbox {
    position: relative;
    flex-shrink: 0;
}

.task-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.task-checkbox label {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.task-checkbox input[type="checkbox"]:checked + label {
    background: var(--primary);
    border-color: var(--primary);
}

.task-checkbox input[type="checkbox"]:checked + label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.task-text.completed {
    text-decoration: line-through;
    color: var(--text-light);
}

.task-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.task-customer {
    color: var(--text-secondary);
}

.task-date {
    color: var(--text-light);
}

.task-priority {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.task-priority.high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.task-priority.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.task-priority.low {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* Performance Metrics */
.period-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.period-select:focus {
    outline: none;
    border-color: var(--primary);
}

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

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

.metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.metric-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.metric-change.positive {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.metric-change.negative {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.metric-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.metric-value {
    font-size: 12px;
    color: var(--text-light);
}

/* Timeline */
.timeline-card {
    margin-top: 20px;
}

.timeline-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

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

/* Son Aktiviteler timeline — çizgi/ikon hizalı, metin kaymasın */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 18px 0 18px 0;
    position: relative;
    min-height: 52px;
}

.timeline-item:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.timeline-marker {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 50%;
    border: 3px solid var(--bg);
    position: absolute;
    left: 7px;
    top: 22px;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-marker.customer {
    background: var(--info);
}

.timeline-marker.rental {
    background: var(--success);
}

.timeline-marker.device {
    background: var(--warning);
}

.timeline-marker.call {
    background: var(--accent);
}

.timeline-marker.payment {
    background: var(--success);
}

.timeline-content {
    flex: 1;
    min-width: 0;
    margin-left: 40px;
    padding-left: 0;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.timeline-header strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-light);
    flex-shrink: 0;
    white-space: nowrap;
}

.timeline-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.timeline-actor {
    font-size: 11px;
    color: var(--text-light);
}

/* Timeline kartında taşma olmasın */
.timeline-card .card-body {
    overflow-x: hidden;
}
.timeline-content * {
    max-width: 100%;
}

/* Footer */
.admin-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 12px 32px;
    z-index: 100;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 100%;
    gap: 16px;
}

.footer-text {
    font-size: 12px;
    color: var(--text-light);
}

/* Clients Page Styles */
.tabs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
    bottom: -1px;
    text-decoration: none;
}
a.tab-btn { text-decoration: none; }

.tab-btn:hover {
    color: var(--text-primary);
}

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

.tab-btn i {
    font-size: 16px;
}

.tabs-actions {
    display: flex;
    gap: 12px;
}

.tab-content {
    display: none;
}

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

/* Mobil Uygulama sayfası */
.app-devices-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.app-tab-btn { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.app-tab-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.app-tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.app-tab-count { background: var(--border-light); color: var(--text-secondary); padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.app-tab-btn.active .app-tab-count { background: rgba(255,255,255,0.3); color: white; }
.uuid-code { font-size: 12px; font-family: monospace; background: var(--bg-secondary); padding: 2px 6px; border-radius: 4px; }
.platform-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.platform-ios { background: #e8f4fd; color: #007aff; }
.platform-android { background: #e8f5e9; color: #4caf50; }
[data-theme="dark"] .platform-ios { background: rgba(0,122,255,0.2); color: #64b5f6; }
[data-theme="dark"] .platform-android { background: rgba(76,175,80,0.2); color: #81c784; }

/* Filters Bar */
.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select,
.filter-date {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.filter-select:focus,
.filter-date:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

/* Companies Grid */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.company-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.company-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.company-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.company-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

[data-theme="dark"] .company-avatar {
    background: var(--accent);
    color: white;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.company-id {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Courier New', monospace;
}

.company-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.company-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-item i {
    width: 16px;
    color: var(--text-light);
    font-size: 14px;
}

.company-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.company-contacts,
.company-devices {
    margin-bottom: 16px;
}

.contacts-header,
.devices-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.add-contact-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.add-contact-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.contact-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

[data-theme="dark"] .contact-avatar-mini {
    background: var(--accent);
    color: white;
}

.contact-info-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.contact-info-mini strong {
    font-size: 13px;
    color: var(--text-primary);
}

.contact-info-mini span {
    font-size: 11px;
    color: var(--text-secondary);
}

.devices-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.device-badge {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Monaco', 'Courier New', monospace;
    color: var(--text-primary);
    font-weight: 500;
}

/* Company Notes */
.company-notes {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.add-note-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.add-note-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.last-note {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.note-preview {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 11px;
    color: var(--text-secondary);
}

.note-author {
    font-weight: 500;
}

.note-date {
    color: var(--text-light);
}

.view-all-notes-btn {
    width: 100%;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.view-all-notes-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Potential Clients Styles */
.company-card.potential {
    border-left: 3px solid var(--accent);
}

.potential-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #fef3c7;
    color: #92400e;
    margin-top: 4px;
}

[data-theme="dark"] .potential-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.potential-badge i {
    font-size: 10px;
}

.potential-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.potential-actions .btn-primary,
.potential-actions .btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Notes Modal */
.modal-content.modal-large {
    max-width: 1400px;
}

.notes-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.note-item-full {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.note-item-full .note-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.note-item-full .note-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.note-item-full .note-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.note-item-full .note-author::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.note-item-full .note-date {
    color: var(--text-light);
}

.table-actions-group,
.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

.table-actions-group {
    flex-wrap: wrap;
}

.table-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    padding: 0;
    flex-shrink: 0;
}

.table-action:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.table-action i {
    font-size: 14px;
}

[data-theme="dark"] .table-action {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] .table-action:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Table Note Preview */
.table-note-preview {
    max-width: 250px;
}

.table-note-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.table-view-notes-btn {
    font-size: 11px;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    transition: color 0.2s ease;
    font-family: inherit;
}

.table-view-notes-btn:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Table Styles for Contacts */
.table-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

[data-theme="dark"] .table-avatar {
    background: var(--accent);
    color: white;
}

.table-user div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.table-user strong {
    font-size: 14px;
    color: var(--text-primary);
}

.table-user span {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-info-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-info-table span {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-info-table i {
    font-size: 11px;
    color: var(--text-light);
}

.badge-count {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

[data-theme="dark"] .badge-count {
    background: var(--accent);
    color: white;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--border);
}

[data-theme="dark"] .modal-content {
    background: var(--bg);
    border-color: var(--border);
}

.modal-content--wide {
    max-width: 820px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-light);
}

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

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
}

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

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

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-light);
}

/* Form Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 7, 45, 0.1);
}

.form-group input:read-only {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

.form-group select {
    cursor: pointer;
}

.form-group--with-divider {
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* Cihaz Modelleri - Özellik satırları */
.specs-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.spec-row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}
.spec-row .spec-icon { font-family: monospace; font-size: 13px; }
.spec-row .spec-remove {
    padding: 8px;
    min-width: 36px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}
.spec-row .spec-remove:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 640px) {
    .spec-row { grid-template-columns: 1fr 1fr; }
    .spec-row .spec-remove { grid-column: span 2; }
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

/* Profil sayfası */
.profile-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}
.profile-msg.success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.profile-msg.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.profile-info-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profile-info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}
.profile-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 140px;
}
.profile-value {
    font-size: 14px;
    color: var(--text-primary);
}
.profile-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.profile-hint i {
    margin-right: 6px;
}
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 360px;
}
.profile-form .btn-primary {
    align-self: flex-start;
}

/* Sayfa formları (modal değil, içerik sayfası formu) */
.page-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form altı aksiyon alanı: Geri Dön + Kaydet vb. – eşit yükseklik, yan yana, %50-%50 genişlik */
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.form-actions .btn-primary,
.form-actions .btn-secondary,
.form-actions a.btn-secondary {
    flex: 1;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-wrapper input[type="text"] {
    width: 100%;
}

/* View Field Styles (Read-only display) */
.view-field {
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 44px;
    line-height: 1.5;
}

.view-field:empty::before {
    content: '-';
    color: var(--text-secondary);
}

.view-contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.view-field-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.view-field-group .view-field {
    display: flex;
    flex-direction: column;
}

.view-field-group .view-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-field-group .view-field > div {
    flex: 1;
}

/* Service Row Styles */
.service-row {
    margin-bottom: 12px;
}

.service-row-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: start; margin-bottom: 12px; }
.data-table--mt { margin-top: 16px; }
.payments-empty-msg { text-align: center; color: var(--text-secondary); padding: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.mb-16 { margin-bottom: 16px; }
.device-section-title { margin-bottom: 16px; color: var(--text-primary); }
.btn-home-outline { background: var(--bg-secondary); color: var(--text-primary); }

.service-row input[type="text"],
.service-row input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
}

.service-row input[type="text"]:focus,
.service-row input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

[data-theme="dark"] .autocomplete-dropdown {
    background: var(--bg-secondary);
    border-color: var(--border);
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .autocomplete-item:hover,
[data-theme="dark"] .autocomplete-item.selected {
    background-color: var(--bg);
}

.autocomplete-item.no-results {
    color: var(--text-secondary);
    cursor: default;
    font-style: italic;
}

.autocomplete-item.no-results:hover {
    background-color: transparent;
}

.autocomplete-item-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.autocomplete-item-title {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Attendee Picker (Katılacaklar) */
.attendee-picker {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--bg);
    min-height: 44px;
}
.attendee-picker:focus-within {
    border-color: var(--primary);
    outline: none;
}
.attendee-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 4px;
}
.attendee-chips:empty {
    margin-bottom: 0;
}
.attendee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
}
.attendee-chip .chip-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.9;
}
.attendee-chip .chip-remove:hover {
    opacity: 1;
}
.attendee-picker .autocomplete-wrapper {
    margin-bottom: 0;
}
.attendee-picker .attendee-search {
    border: none;
    padding: 4px 0;
    min-height: 32px;
}
.attendee-picker .attendee-search:focus {
    outline: none;
    box-shadow: none;
}

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

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

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

.powered-by {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: auto;
}

.powered-by-logo {
    height: 10px;
    width: auto;
    object-fit: contain;
    opacity: 0.6;
}

[data-theme="dark"] .powered-by-logo {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .daily-notes-card {
        grid-column: span 1;
    }
}

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

    .sidebar.open {
        transform: translateX(0);
    }

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

    .menu-toggle {
        display: block;
    }

    .top-header {
        padding: 0 20px;
    }

    .header-title .page-subtitle {
        display: none;
    }

    .header-right {
        gap: 8px;
    }

    .search-box {
        display: none;
    }

    .notification-dropdown {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }

    .user-dropdown {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }

    .content-area {
        padding: 20px;
    }

    .quick-actions {
        gap: 8px;
        margin-bottom: 20px;
    }

    .quick-action-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .quick-action-btn span {
        display: none;
    }

    .quick-action-btn i {
        margin: 0;
    }

    .device-status-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .content-area--settings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-footer {
        margin-left: 0;
        padding: 10px 20px;
    }

    .footer-content {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: flex-end;
    }

    .tabs-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .tabs-actions {
        width: 100%;
    }

    .tabs-actions button {
        flex: 1;
    }

    .companies-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .filter-date {
        flex: 1;
        min-width: 0;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }

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

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .table-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .table-note-preview {
        max-width: 150px;
    }

    .table-note-text {
        font-size: 11px;
        -webkit-line-clamp: 1;
    }

    .data-table th:nth-child(7),
    .data-table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 220px;
        --header-height: 64px;
    }

    .content-area {
        padding: 16px;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .card-body {
        padding: 20px;
    }
}

/* Scrollbar Styling - Sidebar nav */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.content-card {
    animation: fadeIn 0.3s ease;
}

/* Device Page Styles */
.device-serial {
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-serial strong {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.device-customer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-customer > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.device-customer strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.device-customer span {
    font-size: 11px;
    color: var(--text-secondary);
}

.customer-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 0;
}

[data-theme="dark"] .customer-avatar-small {
    background: var(--accent);
    color: white;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

[data-theme="dark"] .status-badge.installing {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

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

[data-theme="dark"] .status-badge.installed {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

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

[data-theme="dark"] .status-badge.available {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

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

[data-theme="dark"] .status-badge.rented {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

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

[data-theme="dark"] .status-badge.maintenance {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-badge.damaged {
    background: #fee2e2;
    color: #b91c1c;
}

[data-theme="dark"] .status-badge.damaged {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Status badge generic types */
.status-badge.status-info {
    background: #dbeafe;
    color: #1e40af;
}
[data-theme="dark"] .status-badge.status-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}
.status-badge.status-warning {
    background: #fef3c7;
    color: #92400e;
}
[data-theme="dark"] .status-badge.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}
.status-badge.status-success {
    background: #d1fae5;
    color: #065f46;
}
[data-theme="dark"] .status-badge.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.status-badge.status-danger {
    background: #fee2e2;
    color: #b91c1c;
}
[data-theme="dark"] .status-badge.status-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Category badges */
.status-badge.cat-device {
    background: #dbeafe;
    color: #1e40af;
}
[data-theme="dark"] .status-badge.cat-device {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}
.status-badge.cat-finance {
    background: #fef3c7;
    color: #92400e;
}
[data-theme="dark"] .status-badge.cat-finance {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
.status-badge.cat-technical {
    background: #ede9fe;
    color: #5b21b6;
}
[data-theme="dark"] .status-badge.cat-technical {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}
.status-badge.cat-general {
    background: #f3f4f6;
    color: #374151;
}
[data-theme="dark"] .status-badge.cat-general {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Ticket sidebar rows */
.tk-sidebar-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
}
.tk-sidebar-label {
    width: 90px;
    min-width: 90px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 2px;
}
.tk-sidebar-label i {
    font-size: 13px;
    width: 16px;
    text-align: center;
}
.tk-sidebar-value {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-word;
}
.tk-sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* Ticket compose area */
.tk-compose {
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    flex-direction: column;
}
.tk-compose-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 0;
}
.tk-mode-toggle {
    display: inline-flex;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
}
.tk-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-light);
    transition: all 0.2s ease;
}
.tk-mode-btn:hover {
    color: var(--text-primary);
}
.tk-mode-btn.active[data-mode="reply"] {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.tk-mode-btn.active[data-mode="internal"] {
    background: #f59e0b;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.tk-note-banner {
    margin: 8px 20px 0;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(245,158,11,0.1);
    color: #d97706;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
[data-theme="dark"] .tk-note-banner {
    background: rgba(245,158,11,0.12);
    color: #fbbf24;
}
.tk-compose-textarea {
    margin: 10px 20px 0;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.tk-compose-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 59,130,246), 0.1);
}
.tk-compose-textarea.tk-internal-mode {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
.tk-compose-textarea.tk-internal-mode:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.25);
}
.tk-compose-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 20px 12px;
}
.tk-send-btn {
    padding: 8px 22px;
    font-size: 13px;
    gap: 6px;
}

.renewal-date {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.renewal-date.urgent {
    color: var(--warning);
    font-weight: 600;
}

.no-customer {
    color: var(--text-light);
    font-style: italic;
    font-size: 12px;
}

.table-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Meetings Page Styles */
.meetings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meeting-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.meeting-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.meeting-item.past {
    opacity: 0.8;
}

.meeting-date-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 80px;
    flex-shrink: 0;
}

.meeting-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 60px;
}

.date-day {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.date-month {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.meeting-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.meeting-time i {
    font-size: 11px;
    color: var(--text-light);
}

.meeting-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.meeting-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.meeting-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.meeting-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

[data-theme="dark"] .meeting-type-badge.online {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.meeting-type-badge.in-person {
    background: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .meeting-type-badge.in-person {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.meeting-type-badge i {
    font-size: 10px;
}

.meeting-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.meeting-participants {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-item > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.participant-item strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.participant-item span {
    font-size: 11px;
    color: var(--text-secondary);
}

.meeting-note {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

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

@media (max-width: 768px) {
    .meeting-item {
        flex-direction: column;
        gap: 16px;
    }

    .meeting-date-time {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .meeting-date {
        min-width: auto;
    }

    .meeting-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .meeting-title-row {
        width: 100%;
    }
}

/* Rental Tracking Page Styles */
.rental-remaining {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 6px;
    display: inline-block;
}

.rental-remaining.urgent {
    color: var(--warning);
    background: #fff7ed;
    font-weight: 600;
}

[data-theme="dark"] .rental-remaining.urgent {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.rental-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.rental-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.rental-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rental-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 768px) {
    .rental-item {
        flex-wrap: wrap;
    }

    .rental-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* Knowledge Center Styles */
.knowledge-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.knowledge-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.knowledge-nav-item i {
    font-size: 16px;
}

.knowledge-section {
    margin-bottom: 32px;
}

.product-info-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.info-block {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.info-block:last-child {
    border-bottom: none;
}

.info-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.info-title i {
    color: var(--primary);
    font-size: 20px;
}

.info-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

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

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.spec-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.spec-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.features-list li i {
    color: var(--primary);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.material-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.material-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.material-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

[data-theme="dark"] .material-icon {
    background: var(--accent);
}

.material-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.material-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.material-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.material-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.material-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    align-self: flex-start;
}

.material-download:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

[data-theme="dark"] .material-download {
    background: var(--accent);
}

[data-theme="dark"] .material-download:hover {
    background: var(--accent-hover);
}

.marketing-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.marketing-block {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
}

.marketing-block:last-child {
    border-bottom: none;
}

.marketing-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.marketing-title i {
    color: var(--primary);
    font-size: 20px;
}

.marketing-tips {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tip-item {
    display: flex;
    gap: 20px;
}

.tip-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

[data-theme="dark"] .tip-number {
    background: var(--accent);
}

.tip-content {
    flex: 1;
}

.tip-content h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.tip-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

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

.script-item {
    padding: 20px;
    background: var(--bg);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
}

.script-item h5,
.script-item h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.script-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-style: italic;
}

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

.story-item {
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.story-header {
    margin-bottom: 16px;
}

.story-company {
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-company > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.story-company strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.story-company span {
    font-size: 12px;
    color: var(--text-secondary);
}

.story-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px 0;
    font-style: italic;
}

.story-author {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.faq-item.active {
    border-color: var(--primary);
    background: var(--bg);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    user-select: none;
}

.faq-question h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.faq-question i {
    color: var(--text-light);
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px 20px;
}

.faq-answer p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .knowledge-nav {
        flex-direction: column;
    }

    .knowledge-nav-item {
        width: 100%;
        justify-content: center;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .materials-grid {
        grid-template-columns: 1fr;
    }

    .material-item {
        flex-direction: column;
    }

    .tip-item {
        flex-direction: column;
    }

    .tip-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Sales Guide Styles */
.sales-guide {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.guide-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.guide-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.guide-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.guide-text:last-child {
    margin-bottom: 0;
}

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

/* How It Works Steps */
.how-it-works {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.step-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Comparison Table */
.comparison-table {
    margin-top: 20px;
    overflow-x: auto;
}

.comparison {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
}

.comparison thead {
    background: var(--bg-secondary);
}

.comparison th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}

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

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

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

@media (max-width: 768px) {
    .how-it-works {
        gap: 16px;
    }

    .step-item {
        flex-direction: column;
        gap: 12px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .comparison-table {
        overflow-x: scroll;
    }

    .comparison {
        min-width: 600px;
    }
}

/* Customer Login Page */
.login-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 120px;
    margin-bottom: 20px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

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

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

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.input-wrapper:has(.password-toggle) input {
    padding-right: 44px;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    margin: 0;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-login:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-login {
    background: var(--accent);
}

[data-theme="dark"] .btn-login:hover {
    background: var(--accent-hover);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Customer Support & Tickets */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

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

.user-info-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 12px;
}

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

.user-company-header {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.ticket-item {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.ticket-item:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.ticket-id {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-number {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

[data-theme="dark"] .ticket-status-badge.open {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

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

[data-theme="dark"] .ticket-status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

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

[data-theme="dark"] .ticket-status-badge.resolved {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.ticket-meta {
    font-size: 12px;
    color: var(--text-light);
}

.ticket-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.ticket-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.ticket-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

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

.ticket-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--bg);
    color: var(--text-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    font-weight: 500;
}

.ticket-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ticket-view-btn:hover {
    background: var(--primary-light);
}

[data-theme="dark"] .ticket-view-btn {
    background: var(--accent);
}

[data-theme="dark"] .ticket-view-btn:hover {
    background: var(--accent-hover);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.priority-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .priority-badge.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.priority-badge.high {
    background: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .priority-badge.high {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.priority-badge.normal {
    background: #dbeafe;
    color: #1e40af;
}

[data-theme="dark"] .priority-badge.normal {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.priority-badge.low {
    background: #f3f4f6;
    color: #4b5563;
}

[data-theme="dark"] .priority-badge.low {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.account-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.account-status.active {
    background: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .account-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.account-status.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

[data-theme="dark"] .account-status.inactive {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.account-status i {
    font-size: 10px;
}

@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }

    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ticket-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-view-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Utility & inline-style replacements (no style="" in HTML) ===== */
.hidden { display: none; }
.d-flex { display: flex; }
.d-flex-gap-8 { display: flex; gap: 8px; }
.d-flex-gap-12 { display: flex; gap: 12px; }
.ml-auto { margin-left: auto; }
.m0 { margin: 0; }
.mr-auto { margin-right: auto; }

/* Modal variants */
.modal-content--sm { max-width: 500px; }
.modal-content--xs { max-width: 480px; }
.modal-content--lg { max-width: 900px; }
.modal-body--center { text-align: center; padding: 30px 20px; }
.modal-body--compact { padding: 20px 24px; }
.modal-footer--sb { justify-content: space-between; gap: 8px; }
.modal-footer-actions { display: flex; gap: 8px; margin-left: auto; }

/* Delete confirm modal */
.delete-confirm-icon-wrap { font-size: 48px; margin-bottom: 16px; }
.delete-confirm-icon { color: var(--warning); }
.delete-confirm-msg { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

/* Client credentials modal */
.client-credentials-desc { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; }
.form-group--mb12 { margin-bottom: 12px; }
.form-group--mb16 { margin-bottom: 16px; }
.label-muted { font-size: 12px; color: var(--text-secondary); }
.flex-row-center { display: flex; gap: 8px; align-items: center; }
.input-monospace { font-family: monospace; font-size: 15px; }
.input-monospace-lg { font-family: monospace; font-size: 15px; font-weight: 600; letter-spacing: 2px; }
.btn-copy { padding: 8px 12px; }

/* Client account info (müşteri paneli) */
.client-account-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: start; margin-bottom: 16px; }
.client-account-info-cell { min-width: 0; }
.client-account-info-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.03em; margin-bottom: 4px; }
.client-account-info-value { font-weight: 500; font-size: 14px; }
.client-account-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Form hint variant */
.form-hint--block { font-size: 12px; color: var(--text-secondary); }

/* Empty states & lists (clients.js, meetings.js, etc.) */
.grid-empty-msg { grid-column: 1 / -1; text-align: center; padding: 40px; }
.contact-mini-clickable { cursor: pointer; }
.empty-list-msg { padding: 12px; text-align: center; }
.empty-state-msg { padding: 20px; text-align: center; }
.autocomplete-item-code { font-size: 11px; color: var(--text-secondary); }

/* View / form layout */
.view-field--span-2 { grid-column: 1 / -1; }
.view-notes-pre { white-space: pre-wrap; }
.form-group--flex2 { flex: 2; }
.form-group--flex1 { flex: 1; }
.filter-select--full { width: 100%; }
.text-success--mb16 { margin-bottom: 16px; }
.form-group--mw360 { max-width: 360px; }
.form-group--mw480 { max-width: 480px; }
.mt-12 { margin-top: 12px; }
.compose-editor-wrap { min-height: 280px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.compose-editor-wrap .ql-container { min-height: 240px; font-size: 15px; }
.compose-editor-wrap .ql-editor { min-height: 240px; }
.compose-recipient-row { display: flex; gap: 12px; flex-wrap: wrap; }
.compose-recipient-row .form-group { flex: 1; min-width: 200px; }

/* Gönderen satırı: hesap + dil + imza yan yana */
.compose-sender-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}
.compose-sender-account { flex: 1; min-width: 220px; max-width: 360px; }
.compose-sender-lang { min-width: 160px; }
.compose-sender-signature { flex-shrink: 0; }
.compose-lang-select { font-size: 15px; }

/* İmza butonu: yeşil gösteriliyor / kırmızı gösterilmiyor - select ile aynı yükseklik */
.btn-signature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    min-height: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}
.btn-signature.btn-signature--on {
    background: var(--success);
    color: #fff;
}
.btn-signature.btn-signature--on:hover { background: #0d9668; }
.btn-signature.btn-signature--off {
    background: var(--danger);
    color: #fff;
}
.btn-signature.btn-signature--off:hover { background: #dc2626; }

/* Alıcı toggle: şık pill butonlar */
.compose-recipient-section { margin-bottom: 20px; }
.recipient-toggle-wrap { margin-bottom: 14px; }
.recipient-toggle {
    display: inline-flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    gap: 2px;
}
.recipient-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.recipient-toggle-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.recipient-toggle-btn.active {
    background: var(--primary);
    color: #fff;
}
.recipient-toggle-btn.active:hover { background: var(--primary-light); color: #fff; }

/* Alıcı autocomplete */
.compose-recipient-section .autocomplete-wrapper { max-width: 480px; }

/* E-posta önizleme modal */
#emailPreviewModal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}
#emailPreviewModal[aria-hidden="false"] { display: flex; }
.modal-dialog--preview {
    background: var(--bg);
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.modal-body--preview {
    padding: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}
.email-preview-frame {
    width: 100%;
    height: 520px;
    overflow: auto;
    background: #fafafa;
    border: none;
}
.email-preview-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.compose-editor-html-mode { display: none; }
.compose-editor-html-mode textarea { width: 100%; min-height: 280px; padding: 12px; font-family: monospace; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; }
.required { color: var(--danger, #dc3545); }

/* Kartlar arası boşluk (Ayarlar sayfası) */
.content-area--card-gap .content-card { margin-bottom: 24px; }
.content-area--card-gap .content-card:last-child { margin-bottom: 0; }

/* Ayarlar sayfası: 6-6 grid (iki kart yan yana) */
.content-area--settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Arama sonuç sayfası */
.search-empty-msg,
.search-loading-msg,
.search-no-results-msg {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    padding: 24px;
}
.search-loading-msg i {
    margin-right: 8px;
}
.search-results-content {
    padding: 8px 0;
}
.search-result-section {
    margin-bottom: 20px;
}
.search-result-section:last-child {
    margin-bottom: 0;
}
.search-result-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}
.search-result-section-title i {
    margin-right: 8px;
    width: 18px;
    text-align: center;
}
.search-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.search-result-list li {
    margin-bottom: 4px;
}
.search-result-link {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.search-result-link:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--primary);
}

/* Arama sonucu banner (sayfada ?sid= ile gelindiğinde) */
.search-result-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(0, 7, 45, 0.05) 0%, rgba(0, 7, 45, 0.02) 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    gap: 16px;
}
.search-result-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}
.search-result-banner-content i {
    color: var(--accent);
    font-size: 16px;
}
.search-result-banner-content strong {
    color: var(--text-primary);
    font-weight: 600;
}
.search-result-banner .btn-sm {
    flex-shrink: 0;
}

/* Buton görünümlü linklerde alt çizgi olmasın */
.btn-link-nodeco { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

/* Email Detail Page */
.email-detail-page { padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.email-detail-layout { display: flex; flex: 1; min-height: 0; }
.email-detail-sidebar { width: 260px; min-width: 200px; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--bg-secondary); overflow-y: auto; }
.email-detail-sidebar__item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); text-decoration: none; font-size: 13px; transition: background .15s; }
.email-detail-sidebar__item:hover { background: var(--bg-hover); }
.email-detail-sidebar__item.active { background: var(--primary); color: #fff; }
.email-detail-sidebar__item.active:hover { background: var(--primary-light); color: #fff; }
.email-detail-sidebar__subj { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-detail-sidebar__from { color: var(--text-secondary); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-detail-sidebar__item.active .email-detail-sidebar__from { color: rgba(255,255,255,.85); }
.email-detail-sidebar__date { color: var(--text-light); font-size: 11px; margin-top: 2px; }
.email-detail-sidebar__item.active .email-detail-sidebar__date { color: rgba(255,255,255,.7); }
.email-detail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.email-detail__topbar { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--bg); flex-wrap: wrap; }
.email-detail__back { color: var(--text-secondary); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.email-detail__back:hover { color: var(--primary); }
.email-detail__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.email-detail__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; font-family: inherit; }
.email-detail__btn-reply { background: var(--accent); color: #fff; }
.email-detail__btn-reply:hover { background: var(--accent-hover); color: #fff; }
.email-detail__btn-forward { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); }
.email-detail__btn-forward:hover { background: var(--bg-hover); color: var(--primary); }
.email-detail__btn-other { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); }
.email-detail__btn-other:hover { background: var(--bg-hover); color: var(--text-primary); }
.email-detail__btn-delete { color: var(--danger); border-color: var(--danger); }
.email-detail__btn-delete:hover { background: var(--danger); color: #fff; }
.email-detail__link-contact { color: var(--primary); text-decoration: none; }
.email-detail__link-contact:hover { text-decoration: underline; }
.email-detail__card-wrap { flex: 1; min-height: 0; overflow: hidden; padding: 20px; display: flex; flex-direction: column; }
.email-detail__card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); max-width: none; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.email-detail__head { padding: 24px 24px 16px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; }
.email-detail__subject { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); margin: 0 0 16px; line-height: 1.4; }
.email-detail__meta { display: flex; flex-wrap: wrap; gap: 16px 24px; font-size: 14px; color: var(--text-secondary); }
.email-detail__meta-item { display: flex; align-items: flex-start; gap: 8px; }
.email-detail__meta-item i { color: var(--accent); margin-top: 2px; }
.email-detail__meta-item strong { color: var(--text-primary); font-weight: 500; }
.email-detail__body { padding: 24px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.email-detail__body:has(.email-body-iframe) { overflow: hidden; }
.email-detail__body-inner { font-size: 15px; line-height: 1.65; color: var(--text-primary); }
.email-detail__body-inner.email-body-html { max-width: 100%; width: 100%; }
.email-detail__body-inner img { max-width: 100%; height: auto; }
.email-body-iframe { width: 100%; border: none; min-height: 620px; flex: 1; display: block; }
.email-images-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; margin-bottom: 12px; font-size: 13px; color: #92400e; }
.email-images-bar i { font-size: 15px; }
.email-images-bar__btn { background: #f59e0b; color: #fff; border: none; padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.email-images-bar__btn:hover { background: #d97706; }
.email-detail__badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--bg-secondary); color: var(--text-secondary); padding: 4px 10px; border-radius: 6px; }
.email-detail-sidebar__item--empty { pointer-events: none; color: var(--text-light); }
.btn-link-nodeco:hover { text-decoration: none; }

/* AR-GE */
.rd-toolbar { margin-bottom: 24px; }
.rd-toolbar-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.rd-toolbar-item { flex: 0 0 auto; min-width: 200px; }
.rd-toolbar-buttons { display: flex; gap: 8px; align-items: flex-end; }
.rd-toolbar-btn { height: 38px; display: inline-flex; align-items: center; gap: 6px; }
.rd-search-wrap { flex: 1; min-width: 200px; max-width: 320px; }
.rd-search-wrap label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.rd-search-input-wrap { position: relative; display: flex; align-items: center; }
.rd-search-input-wrap i { position: absolute; left: 12px; color: var(--text-light); font-size: 14px; pointer-events: none; }
.rd-search-input-wrap input { padding-left: 36px; height: 38px; width: 100%; }
.rd-list { display: flex; flex-direction: column; gap: 12px; }
.rd-files-section .rd-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 992px) { .rd-files-section .rd-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .rd-files-section .rd-list { grid-template-columns: 1fr; } }
.rd-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 8px; }
.rd-item-content { flex: 1; min-width: 0; }
.rd-item-text { font-size: 14px; line-height: 1; color: var(--text-primary); white-space: pre-wrap; }
.rd-item-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.rd-item-link:hover { text-decoration: underline; }
.rd-item-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.rd-item-media { margin-top: 10px; }
.rd-item-photo { margin-top: 10px; }
.rd-photo-link { display: inline-block; }
.rd-photo-thumb { max-width: 160px; max-height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-light); cursor: pointer; }
.rd-photo-thumb:hover { opacity: 0.9; }
.rd-photo-link { background: none; border: none; padding: 0; cursor: pointer; }

/* Video thumbnail */
.rd-item-video { margin-top: 10px; }
.rd-video-link { display: inline-flex; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border: 1px solid var(--border-light); border-radius: 8px; padding: 16px 24px; cursor: pointer; transition: all 0.2s ease; }
.rd-video-link:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.rd-video-thumb { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; }
.rd-video-thumb i { font-size: 32px; color: #fff; opacity: 0.9; }
.rd-video-thumb span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.rd-video-modal-content { background: var(--bg-primary); border-radius: 12px; overflow: hidden; }

/* File inline preview layout */
.rd-file-row { display: flex; align-items: flex-start; gap: 14px; }
.rd-file-thumb { flex-shrink: 0; }
.rd-file-thumb-img {
    max-height: 118px;
    max-width: 160px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    display: block;
    transition: opacity 0.15s;
}
.rd-file-thumb-img:hover { opacity: 0.85; }
.rd-file-thumb .rd-photo-link { background: none; border: none; padding: 0; cursor: pointer; display: block; }
.rd-file-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 118px;
    height: 118px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    font-size: 36px;
}
.rd-file-thumb-video:hover { transform: scale(1.03); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.rd-file-thumb-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100px;
    height: 118px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #b91c1c;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.rd-file-thumb-pdf i { font-size: 32px; }
.rd-file-thumb-pdf:hover { background: linear-gradient(135deg, #fecaca, #fca5a5); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(185,28,28,0.12); }
[data-theme="dark"] .rd-file-thumb-pdf { background: linear-gradient(135deg, rgba(185,28,28,0.15), rgba(185,28,28,0.2)); border-color: rgba(185,28,28,0.3); color: #fca5a5; }
[data-theme="dark"] .rd-file-thumb-pdf:hover { background: linear-gradient(135deg, rgba(185,28,28,0.25), rgba(185,28,28,0.3)); }
.rd-file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 480px) {
    .rd-file-row { gap: 10px; }
    .rd-file-thumb-img { max-height: 80px; max-width: 100px; }
    .rd-file-thumb-video { width: 80px; height: 80px; font-size: 28px; }
    .rd-file-thumb-pdf { width: 72px; height: 80px; font-size: 11px; }
    .rd-file-thumb-pdf i { font-size: 24px; }
}

/* Code block styles */
.rd-code-block { position: relative; margin: 12px 0; background: #1e1e2e; border-radius: 8px; overflow: hidden; }
.rd-code-copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #cdd6f4; padding: 6px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; z-index: 5; }
.rd-code-copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
.rd-code-copy-btn i { pointer-events: none; }
.rd-code-content { margin: 0; padding: 16px; padding-right: 60px; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace; font-size: 13px; line-height: 1; color: #cdd6f4; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; }
.rd-photo-modal-content { max-width: 95vw; max-height: 95vh; width: 90vw; height: 90vh; display: flex; flex-direction: column; }
.rd-photo-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.rd-photo-modal-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; background: var(--bg-secondary); }
.rd-photo-full { max-width: 100%; max-height: 100%; object-fit: contain; }
.rd-photo-modal-footer { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border-light); }
.rd-upload-progress { padding: 20px 0; }
.rd-upload-progress-text { margin: 0 0 12px; font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.rd-upload-progress-bar-wrap { height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.rd-upload-progress-bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.2s ease; }
.rd-upload-progress-pct { margin: 0; font-size: 13px; font-weight: 600; color: var(--primary); }
.rd-item-meta { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.rd-item-delete { flex-shrink: 0; }

/* Invoice table */
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100px; }
.w-120 { width: 120px; }

/* Auth login */
.login-error { background: #fee; color: #c33; padding: 12px; border-radius: 8px; margin-bottom: 20px; text-align: center; font-size: 14px; }
.login-success { background: #efe; color: #3c3; padding: 12px; border-radius: 8px; margin-bottom: 20px; text-align: center; font-size: 14px; }

/* Table empty cell */
.table-empty-cell { text-align: center; padding: 40px; color: var(--text-secondary); }
.table-empty-cell--sm { text-align: center; padding: 20px; color: var(--text-secondary); }
.email-sent-view-btn { cursor: pointer; color: var(--text-secondary); padding: 4px 8px; }
.email-sent-view-btn:hover { color: var(--primary); }
.email-sent-row-clickable { cursor: pointer; }
.email-sent-row-clickable:hover { background: var(--bg-hover); }
.sent-detail-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sent-detail-body { max-height: 60vh; overflow-y: auto; }
.text-muted { color: var(--text-secondary); }
.invoice-th--qty { text-align: center; width: 100px; }
.invoice-th--price { text-align: right; width: 120px; }
.invoice-td--center { text-align: center; }
.invoice-td--right { text-align: right; }
.form-hint--warning { color: var(--warning); }
.calc-total-box { background: var(--bg-secondary); padding: 12px; border-radius: 6px; margin-top: 16px; }
.calc-total-label { font-weight: 600; margin-bottom: 8px; }
.calc-total-value { font-size: 24px; font-weight: bold; color: var(--primary); }
.form-section { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.form-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.form-section-title { font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-remove { padding: 8px 12px; }
.summary-box { margin-top: 16px; padding: 12px; background: var(--bg-secondary); border-radius: 6px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.summary-row-total { display: flex; justify-content: space-between; font-weight: bold; font-size: 18px; padding-top: 8px; border-top: 1px solid var(--border); }
.view-section { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 24px; }
.view-section-title { margin: 0 0 16px 0; }
.btn-as-link { text-decoration: none; display: inline-block; padding: 10px 20px; }
.metric-fill-45 { width: 45%; }
.metric-fill-60 { width: 60%; }
.metric-fill-75 { width: 75%; }
.metric-fill-85 { width: 85%; }

/* Dashboard: link elements that replace buttons — görünüm kayması olmasın */
a.card-action {
    display: inline-block;
    text-decoration: none;
    color: var(--accent);
}
a.card-action:hover {
    color: var(--accent-hover);
}
a.status-action {
    display: block;
    text-align: center;
    text-decoration: none;
    border-radius: 0 0 12px 12px;
}
a.card-action-btn {
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
span.period-select {
    display: inline-block;
    cursor: default;
}

/* JSON Display for Audit Logs */
.json-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* Diff highlighting for audit logs */
.audit-diff-old {
    font-weight: bold;
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
}

.audit-diff-new {
    font-weight: bold;
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
    margin: 0;
}

/* ===== API Docs ===== */
.api-docs-layout { display: flex; gap: 24px; align-items: flex-start; }
.api-docs-nav { position: sticky; top: 100px; width: 310px; flex-shrink: 0; background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: 10px; padding: 16px; }
.api-docs-nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin: 0 0 12px; padding: 0 4px; }
.api-docs-nav ul { list-style: none; padding: 0; margin: 0; }
.api-docs-nav li { margin-bottom: 2px; }
.api-docs-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text-secondary); text-decoration: none; transition: all .15s; }
.api-docs-nav a:hover { background: var(--bg-secondary); color: var(--text-primary); }
.api-docs-nav a.active { background: var(--primary); color: #fff; }
.api-docs-nav a i { width: 16px; text-align: center; font-size: 12px; }
.api-docs-nav .nav-method { font-size: 9px; font-weight: 700; letter-spacing: 0.3px; padding: 1px 5px; border-radius: 3px; margin-left: auto; flex-shrink: 0; }
.api-docs-nav .nav-method-get { background: #dcfce7; color: #166534; }
.api-docs-nav .nav-method-post { background: #dbeafe; color: #1e40af; }
.api-docs-nav .nav-method-any { background: #fef3c7; color: #92400e; }
@media (max-width: 1100px) { .api-docs-nav { display: none; } .api-docs { max-width: 100%; } }
.api-docs { max-width: 960px; flex: 1; min-width: 0; }
.api-hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); border-radius: 12px; padding: 32px; margin-bottom: 24px; color: #fff; }
.api-hero h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: #fff; }
.api-hero p { margin: 0; font-size: 14px; color: #94a3b8; }
.api-base-url { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 10px 16px; margin-top: 16px; font-family: 'Monaco','Menlo','Consolas',monospace; font-size: 14px; color: #38bdf8; }
.api-base-url .api-copy-btn { background: none; border: none; color: #64748b; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: all .2s; }
.api-base-url .api-copy-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.api-section { background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
.api-section-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background .2s; }
.api-section-header:hover { background: var(--bg-secondary); }
.api-section-header h3 { margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.api-section-header .api-chevron { transition: transform .2s; color: var(--text-light); }
.api-section-header.collapsed .api-chevron { transform: rotate(-90deg); }
.api-section-body { padding: 24px; }
.api-section-body.hidden { display: none; }
.api-method-badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.api-method-get { background: #dcfce7; color: #166534; }
.api-method-post { background: #dbeafe; color: #1e40af; }
.api-method-any { background: #fef3c7; color: #92400e; }
.api-endpoint-url { display: inline-block; background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 6px; padding: 8px 14px; font-family: 'Monaco','Menlo','Consolas',monospace; font-size: 13px; color: var(--primary); margin: 12px 0; word-break: break-all; }
.api-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.api-table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 13px; }
.api-table th { background: var(--bg-secondary); padding: 10px 14px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-secondary); border-bottom: 2px solid var(--border-light); }
.api-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.api-table tr:last-child td { border-bottom: none; }
.api-table code { background: var(--bg-secondary); padding: 2px 6px; border-radius: 3px; font-size: 12px; color: var(--primary); }
.api-required { color: #dc2626; font-weight: 600; font-size: 11px; }
.api-optional { color: #6b7280; font-size: 11px; }
.api-code-block { position: relative; background: #1e1e2e; border-radius: 8px; margin: 12px 0; overflow: hidden; }
.api-code-block pre { margin: 0; padding: 16px; font-family: 'Monaco','Menlo','Consolas',monospace; font-size: 13px; line-height: 1.5; color: #cdd6f4; overflow-x: auto; }
.api-code-block .api-code-copy { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #94a3b8; padding: 5px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; transition: all .2s; }
.api-code-block .api-code-copy:hover { background: rgba(255,255,255,0.15); color: #fff; }
.api-code-lang { position: absolute; top: 8px; left: 12px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
.api-subtitle { font-size: 14px; font-weight: 600; margin: 20px 0 8px; color: var(--text-primary); }
.api-subtitle:first-child { margin-top: 0; }
.api-status-list { list-style: none; padding: 0; margin: 8px 0 16px; }
.api-status-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.api-status-list li code { font-weight: 600; }
.api-status-list li span { color: var(--text-secondary); }
.api-auth-box { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border: 1px solid #fcd34d; border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; }
.api-auth-box h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #92400e; }
.api-auth-box p { margin: 0; font-size: 13px; color: #78350f; line-height: 1.5; }
.api-auth-box code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 3px; font-size: 12px; }
.api-flow-box { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 8px; padding: 20px; margin: 16px 0; }
.api-flow-step { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.api-flow-step:last-child { border-bottom: none; padding-bottom: 0; }
.api-flow-step:first-child { padding-top: 0; }
.api-flow-num { width: 28px; height: 28px; flex-shrink: 0; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.api-flow-content { flex: 1; }
.api-flow-content strong { display: block; font-size: 13px; margin-bottom: 4px; }
.api-flow-content span { font-size: 12px; color: var(--text-secondary); }
.api-flow-content code { background: var(--bg-primary); border: 1px solid var(--border-light); padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.api-error-table { margin-top: 12px; }
.api-error-table td:first-child { font-weight: 600; color: #dc2626; white-space: nowrap; }
.api-db-table td:first-child { font-weight: 600; font-family: 'Monaco','Menlo','Consolas',monospace; font-size: 12px; color: var(--primary); white-space: nowrap; }
.api-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.api-tag-auth { background: #fef2f2; color: #991b1b; }
.api-tag-public { background: #f0fdf4; color: #166534; }

/* ===== Contracts ===== */
.contract-templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.contract-template-card { background: var(--bg-primary); border: 2px solid var(--border-color); border-radius: 12px; padding: 24px 20px; text-align: center; transition: border-color 0.2s, box-shadow 0.2s; cursor: pointer; }
.contract-template-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(37,99,235,0.10); }
.contract-template-card--soon { opacity: 0.55; pointer-events: none; }
.contract-template-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #06b6d4); display: flex; align-items: center; justify-content: center; }
.contract-template-icon i { font-size: 24px; color: #fff; }
.contract-template-card h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.contract-template-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }

.contract-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 900px) { .contract-form-grid { grid-template-columns: 1fr; } }
.contract-form-section-title { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.contract-form-section-title i { color: var(--primary); font-size: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contract-info-box { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px 14px; margin-top: 8px; }
.contract-info-row { display: flex; gap: 8px; font-size: 13px; padding: 3px 0; }
.contract-info-row span:first-child { color: var(--text-secondary); min-width: 70px; }
.contract-info-row strong { color: var(--text-primary); font-weight: 600; }

.contract-preview-actions { display: flex; gap: 8px; margin-bottom: 16px; justify-content: flex-end; }
.contract-preview-container { max-width: 794px; margin: 0 auto; color: #1a1a1a; }
.contract-preview-page { background: #fff; border: 1px solid #d1d5db; border-radius: 4px; padding: 40px 48px; min-height: 1123px; box-shadow: 0 2px 16px rgba(0,0,0,0.10); position: relative; margin-bottom: 24px; overflow: hidden; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .form-row-3 { grid-template-columns: 1fr; } }

/* Serial Tags */
.serial-tags-container { border: 1px solid var(--border-color); border-radius: 6px; padding: 6px 8px; background: var(--bg-primary); min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: text; }
.serial-tags-container:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.serial-tags-list { display: flex; flex-wrap: wrap; gap: 5px; }
.serial-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--primary); color: #fff; padding: 3px 8px 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; }
.serial-tag-remove { background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; display: flex; align-items: center; }
.serial-tag-remove:hover { color: #fff; }
.serial-input-wrapper { position: relative; flex: 1; min-width: 100px; }
.serial-input { border: none; outline: none; background: transparent; font-size: 13px; width: 100%; padding: 4px 0; color: var(--text-primary); }
.serial-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); max-height: 200px; overflow-y: auto; z-index: 100; margin-top: 4px; }
.serial-suggestion { padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.serial-suggestion:hover, .serial-suggestion.active { background: var(--bg-secondary); }
.serial-suggestion-id { font-weight: 700; letter-spacing: 0.5px; color: var(--text-primary); }
.serial-suggestion-model { font-size: 11px; color: var(--text-secondary); }

/* Contract Document (preview — matches print sizing) */
.contract-document { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 10px; color: #1a1a1a; line-height: 1.4; }
.contract-doc-header { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.contract-doc-logo img { height: 34px; width: auto; }
.contract-doc-header-text { flex: 1; }
.contract-doc-header-text h1 { font-size: 14px; font-weight: 800; color: #111; letter-spacing: 0.5px; margin: 0; }
.contract-doc-divider { height: 2px; background: linear-gradient(90deg, #2563eb, #06b6d4, #e5e7eb); margin: 6px 0 8px; border-radius: 2px; }
.contract-doc-parties { display: flex; gap: 12px; margin-bottom: 8px; }
.contract-doc-party { flex: 1; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 5px; padding: 7px 10px; }
.contract-doc-party h3 { font-size: 8px; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; border-bottom: 1px solid #e2e8f0; padding-bottom: 3px; }
.contract-doc-info-table { width: 100%; font-size: 9px; }
.contract-doc-info-table td { padding: 1px 0; vertical-align: top; }
.contract-doc-info-table td:first-child { width: 75px; color: #64748b; font-weight: 500; }
.contract-doc-info-table td:last-child { color: #1e293b; font-weight: 600; }
.contract-doc-note { font-size: 10px; color: #64748b; font-style: italic; margin-bottom: 12px; }
.contract-doc-section { margin-bottom: 6px; }
.contract-doc-section h3 { font-size: 10px; font-weight: 700; color: #1e293b; margin-bottom: 3px; border-left: 2px solid #2563eb; padding-left: 6px; }
.contract-doc-section p { margin-bottom: 2px; text-align: justify; }
.contract-doc-section ul { margin: 2px 0 2px 18px; }
.contract-doc-section ul li { margin-bottom: 1px; }
.contract-doc-sub-title { font-weight: 700; color: #374151; margin: 4px 0 2px; }
.contract-doc-small { font-size: 8.5px; color: #6b7280; margin-bottom: 4px; }
.contract-doc-detail-table { width: 100%; border-collapse: collapse; margin: 3px 0 5px; }
.contract-doc-detail-table td { padding: 2px 7px; border: 1px solid #e2e8f0; font-size: 9px; }
.contract-doc-detail-table td:first-child { width: 130px; background: #f1f5f9; font-weight: 600; color: #475569; }
.contract-doc-damage-table { width: 100%; border-collapse: collapse; margin: 3px 0 5px; }
.contract-doc-damage-table th { padding: 2px 8px; background: #1e293b; color: #fff; font-size: 8.5px; font-weight: 600; text-align: left; }
.contract-doc-damage-table td { padding: 2px 8px; border: 1px solid #e2e8f0; font-size: 8.5px; }
.contract-doc-damage-table tr:nth-child(even) { background: #f8fafc; }
.contract-damage-highlight td { background: #fef2f2 !important; font-weight: 600; color: #991b1b; }
.contract-doc-signatures { display: flex; gap: 30px; margin: 16px 0 10px; }
.contract-doc-signature { flex: 1; text-align: center; }
.sig-label { font-size: 8.5px; font-weight: 700; color: #1e293b; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px; }
.sig-sub { font-size: 8px; color: #64748b; margin-bottom: 28px; }
.sig-line { border-bottom: 1px solid #1a1a1a; margin-bottom: 4px; }
.sig-caption { font-size: 9px; color: #94a3b8; }
.sig-name { font-size: 12px; font-weight: 700; color: #1e293b; }
.sig-contact { font-size: 11px; color: #64748b; }
.contract-doc-nbo { text-align: right; margin-top: 24px; opacity: 0.25; }
.contract-doc-nbo img { width: 30px; height: auto; }
.special-clause-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.special-clause-row .filter-select { flex: 1; }
.special-clause-remove { flex-shrink: 0; color: #ef4444; background: none; border: none; cursor: pointer; font-size: 14px; padding: 4px 6px; }
.special-clause-remove:hover { color: #dc2626; }
.contract-doc-special-clauses { margin-bottom: 6px; }
.contract-doc-special-clauses h3 { font-size: 10px; font-weight: 700; color: #1e293b; margin-bottom: 3px; border-left: 2px solid #2563eb; padding-left: 6px; }
.contract-doc-special-clauses ol { margin: 2px 0 2px 18px; }
.contract-doc-special-clauses ol li { margin-bottom: 1px; text-align: justify; }

/* Warranty compact single-A4 styling */
.contract-document--warranty { font-size: 8pt; line-height: 1.25; }
.contract-document--warranty .contract-doc-header h1 { font-size: 11pt; margin-bottom: 2px; }
.contract-document--warranty .contract-doc-divider { margin: 4px 0; }
.contract-document--warranty .contract-doc-note { font-size: 7.5pt; margin-bottom: 3px; }
.contract-document--warranty .contract-doc-section { margin-bottom: 4px; }
.contract-document--warranty .contract-doc-section h3 { font-size: 8.5pt; margin-bottom: 2px; padding-left: 6px; border-left-width: 2px; }
.contract-document--warranty .contract-doc-section p { margin-bottom: 2px; }
.contract-document--warranty .contract-doc-section ul { margin: 1px 0 2px 16px; padding: 0; }
.contract-document--warranty .contract-doc-section ul li { margin-bottom: 0; line-height: 1.3; }
.contract-document--warranty .contract-doc-detail-table td { padding: 1px 6px; font-size: 8pt; }
.contract-document--warranty .contract-doc-small { font-size: 7pt; margin-bottom: 2px; }
.contract-document--warranty .contract-doc-signatures { margin-top: 10px; }
.contract-document--warranty .sig-label { font-size: 8pt; }
.contract-document--warranty .sig-sub { font-size: 7.5pt; }
.contract-document--warranty .sig-line { margin: 8px 0 2px; }
.contract-document--warranty .sig-caption { font-size: 7pt; }
.contract-document--warranty .contract-doc-nbo { margin-top: 8px; }

/* Delivery compact single-A4 styling */
.contract-document--delivery { font-size: 9pt; line-height: 1.35; }
.contract-document--delivery .contract-doc-header h1 { font-size: 13pt; }
.contract-document--delivery .contract-doc-section { margin-bottom: 8px; }
.contract-document--delivery .contract-doc-section h3 { font-size: 9.5pt; }
.contract-document--delivery .contract-doc-detail-table td { padding: 3px 8px; font-size: 8.5pt; }

/* Delivery statement & handwrite area */
.delivery-statement-section { margin-top: 20px; margin-bottom: 18px; }
.delivery-statement { font-weight: 700; font-size: 9.5pt; color: #1e293b; line-height: 1.5; margin: 0; }
.delivery-handwrite-area { margin: 0 0 14px; padding: 14px 16px; border: 1.5px dashed #94a3b8; border-radius: 6px; background: #f8fafc; }
.delivery-handwrite-label { font-size: 8.5pt; font-weight: 600; color: #475569; margin: 0 0 4px; line-height: 1.4; }
.delivery-handwrite-hint { font-size: 8pt; color: #94a3b8; font-style: italic; margin: 0 0 10px; line-height: 1.4; }
.delivery-handwrite-box { min-height: 48px; border-bottom: 1px solid #cbd5e1; }

/* Return Receipt compact styles */
.contract-document--return { font-size: 9pt; line-height: 1.35; }
.contract-document--return .contract-doc-header h1 { font-size: 13pt; }
.contract-document--return .contract-doc-section { margin-bottom: 8px; }
.contract-document--return .contract-doc-section h3 { font-size: 9.5pt; }
.contract-document--return .contract-doc-detail-table td { padding: 3px 8px; font-size: 8.5pt; }

/* Saved Contracts List */
.saved-contracts-table { width: 100%; border-collapse: collapse; }
.saved-contracts-table th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 2px solid var(--border-color); }
.saved-contracts-table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.saved-contracts-table tr:hover { background: var(--bg-secondary); }
.saved-contracts-table .badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.saved-contracts-table .badge-rental { background: #dbeafe; color: #1d4ed8; }
.saved-contracts-table .badge-warranty { background: #fef3c7; color: #92400e; }
.saved-contracts-table .badge-delivery { background: #d1fae5; color: #065f46; }
.saved-contracts-table .badge-return { background: #fef3c7; color: #92400e; }
.saved-contracts-table .actions-cell { white-space: nowrap; }
.saved-contracts-table .actions-cell .btn { margin-right: 4px; }
.saved-contracts-empty { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.saved-contracts-empty i { font-size: 32px; display: block; margin-bottom: 12px; opacity: 0.4; }
.modal-overlay--fixed { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }

/* Potential Contacts */
.contact-name-cell { display: flex; align-items: center; gap: 10px; }
.contact-avatar-sm { width: 32px; height: 32px; min-width: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
[data-theme="dark"] .contact-avatar-sm { background: var(--accent); }
.contact-fullname { font-weight: 500; }
.table-link { color: var(--primary); text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.empty-table-msg { text-align: center; padding: 32px 16px; color: var(--text-secondary); }
.empty-table-msg i { margin-right: 8px; opacity: 0.5; }
.input-readonly { background: var(--bg-secondary); cursor: not-allowed; opacity: 0.8; }
.modal-footer--sb { display: flex; justify-content: space-between; align-items: center; }
.modal-footer-actions { display: flex; gap: 8px; }

/* ===== Btn Icon (table action buttons) ===== */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
}
[data-theme="dark"] .btn-icon {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
[data-theme="dark"] .btn-icon:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}
.btn-icon--danger { border-color: rgba(239,68,68,0.3); color: #ef4444; }
.btn-icon--danger:hover { background: rgba(239,68,68,0.08); border-color: #ef4444; color: #dc2626; }
[data-theme="dark"] .btn-icon--danger { border-color: rgba(239,68,68,0.3); color: #f87171; }
[data-theme="dark"] .btn-icon--danger:hover { background: rgba(239,68,68,0.12); border-color: #f87171; color: #fca5a5; }

/* ===== Generic Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge--success { background: #d1fae5; color: #065f46; }
.badge--secondary { background: #f3f4f6; color: #6b7280; }
.badge--info { background: #dbeafe; color: #1e40af; }
.badge--default { background: #f3f4f6; color: #374151; }
.badge--warning { background: #fef3c7; color: #92400e; }
.badge--danger { background: #fee2e2; color: #b91c1c; }
[data-theme="dark"] .badge--success { background: rgba(16,185,129,0.2); color: #34d399; }
[data-theme="dark"] .badge--secondary { background: rgba(107,114,128,0.2); color: #9ca3af; }
[data-theme="dark"] .badge--info { background: rgba(59,130,246,0.2); color: #60a5fa; }
[data-theme="dark"] .badge--default { background: rgba(55,65,81,0.3); color: #d1d5db; }
[data-theme="dark"] .badge--warning { background: rgba(245,158,11,0.2); color: #fbbf24; }
[data-theme="dark"] .badge--danger { background: rgba(239,68,68,0.2); color: #f87171; }
.badge i { font-size: 11px; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    padding: 12px 0;
    flex-wrap: wrap;
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}
.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.pagination-btn.active:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}
.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}
[data-theme="dark"] .pagination-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
[data-theme="dark"] .pagination-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}
[data-theme="dark"] .pagination-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
[data-theme="dark"] .pagination-btn.active:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

/* QR Color Picker */
.qr-color-btn { outline: none; }
.qr-color-btn:hover { transform: scale(1.12); }
.qr-color-btn.active { border-color: var(--primary) !important; box-shadow: 0 0 0 2px var(--primary); transform: scale(1.1); }
[data-theme="dark"] .qr-color-btn.active { border-color: var(--accent) !important; box-shadow: 0 0 0 2px var(--accent); }
