@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.6;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background);
}

.login-box {
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
    background-color: var(--card-background);
    color: var(--text-primary);
}

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

.form-group input:read-only {
    background-color: #f1f5f9;
    cursor: not-allowed;
}

.error-message {
    color: var(--danger);
    margin: 0.5rem 0;
    font-size: 0.875rem;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background-color: #475569;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-height: auto;
    line-height: 1.4;
}

/* Tablo içindeki butonlar için ek küçültme */
table .btn-small {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 8px;
}

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

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

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

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked + .slider {
    background-color: var(--primary);
}

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

input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.switch-label span {
    user-select: none;
}

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

.sidebar {
    width: 260px;
    background-color: var(--card-background);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-menu {
    list-style: none;
    padding: 0.75rem 0;
}

.sidebar-menu li {
    margin: 0.25rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9375rem;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.sidebar-menu a.active {
    background-color: #eff6ff;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* Sidebar Grupları */
.sidebar-group {
    margin-bottom: 1.5rem;
}

.sidebar-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem 0.5rem;
    margin-bottom: 0.25rem;
}

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

.sidebar-group-items li {
    margin: 0;
}

.sidebar-group-items li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 0;
    border-left: 3px solid transparent;
}

.sidebar-group-items li a:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.sidebar-group-items li a.active {
    background-color: var(--primary);
    color: white;
    border-left-color: var(--primary-dark);
}

.sidebar-icon {
    font-size: 1.125rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-label {
    flex: 1;
}

/* Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
}

.stat-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-content p {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-section {
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dashboard-grid.charts-side-by-side {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-grid.charts-side-by-side {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.dashboard-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-card canvas {
    max-height: 300px;
}

.conversion-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.conversion-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conversion-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.conversion-bar {
    width: 100%;
    height: 24px;
    background: var(--background);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.conversion-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.conversion-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.process-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.process-item-label {
    font-weight: 500;
    color: var(--text-primary);
}

.process-item-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Hızlı Aksiyonlar */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.quick-action-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.quick-action-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 16px;
}

.quick-action-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

/* Performans Metrikleri */
.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
    white-space: nowrap;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Aktivite Listesi */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: start;
    gap: 1rem;
    transition: background 0.2s;
}

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

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

.activity-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

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

.activity-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.activity-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Fırsatlar Listesi (Card-based) */
.opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.opportunity-card {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    overflow: hidden;
}

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

.opportunity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.opportunity-header:hover {
    background: var(--background);
}

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

.opportunity-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.opportunity-id {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.opportunity-title strong {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
}

.quote-badge {
    color: var(--success);
    font-size: 1.25rem;
    line-height: 1;
}

.opportunity-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.opportunity-contact {
    font-weight: 500;
    color: var(--text-primary);
}

.opportunity-separator {
    color: var(--border);
}

.opportunity-phone {
    color: var(--text-secondary);
}

.opportunity-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-toggle-details {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-details:hover {
    color: var(--primary);
}

.toggle-icon {
    transition: transform 0.2s;
    font-size: 0.75rem;
}

.opportunity-details {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--background);
}

.opportunity-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.opportunity-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.opportunity-card-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Uygulama Linkleri */
.app-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    background: var(--background);
    border: 1px solid var(--border);
}

.app-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.app-link:active {
    transform: translateY(0);
}

/* Profil Sayfası */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 600;
    color: white;
    border: 4px solid var(--border);
    overflow: hidden;
    position: relative;
}

.profile-avatar span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.profile-phone {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-role {
    font-size: 0.9375rem;
    color: var(--primary);
    font-weight: 500;
}

.profile-form-section {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.profile-form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Ayarlar Sayfası */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.settings-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.2s;
}

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

.setting-info {
    flex: 1;
}

.setting-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
}

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

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    display: none;
}

.success-message.show {
    display: block;
}

/* Global Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Harita Stilleri */
#visitsMap {
    width: 100%;
    min-height: 500px;
    height: 500px;
    background: var(--background);
    position: relative;
    z-index: 1;
}

/* Leaflet harita container için gerekli stiller */
#visitsMap.leaflet-container {
    height: 500px;
    width: 100%;
    z-index: 1;
}

#visitsMap .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

#visitsMap .leaflet-popup-content {
    margin: 12px;
    font-family: 'Poppins', sans-serif;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 64px;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.top-bar-icon-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--danger);
    color: white;
    border-radius: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
}

.user-menu-btn:hover {
    background-color: #f1f5f9;
}

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

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9375rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.user-menu-item:hover {
    background-color: #f8fafc;
}

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

.user-menu-item.danger:hover {
    background-color: #fef2f2;
}

.user-menu-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 360px;
    max-height: 480px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

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

.notification-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item.unread {
    background-color: #eff6ff;
}

.notification-item.unread:hover {
    background-color: #dbeafe;
}

.notification-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.notification-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.main-content {
    margin-left: 260px;
    margin-top: 64px;
    flex: 1;
    padding: 2rem;
    background-color: var(--background);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Dashboard */
/* Eski stat-card stilleri yukarıda güncellendi, burada tekrar tanımlanmışsa kaldırıldı */

.content-section {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.content-section h2 {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
}

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

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr {
    transition: background-color 0.2s;
}

table tr:hover {
    background-color: #f8fafc;
}

table td {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-draft {
    background-color: #e2e8f0;
    color: #475569;
}

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

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

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

.status-cancelled {
    background-color: #e2e8f0;
    color: #475569;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    overflow: auto;
    backdrop-filter: blur(4px);
}

/* İkinci seviye modal (temas modalı gibi) */
.modal.modal-level-2 {
    z-index: 2000;
}

.modal-content {
    background-color: var(--card-background);
    margin: 3% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.modal-content.large {
    max-width: 1200px;
    width: 95%;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

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

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Quote Items */
.quote-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

.quote-item-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

.quote-item-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quote-item-col-product {
    min-width: 0;
}

.quote-item-col-action {
    align-items: flex-start;
    padding-top: 1.75rem;
}

.quote-item-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.product-select,
.quantity-input,
.price-input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.2s;
    width: 100%;
    background: var(--card-background);
    color: var(--text-primary);
}

.product-select:focus,
.quantity-input:focus,
.price-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.product-modules {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    line-height: 1.5;
}

.product-modules ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.product-modules li {
    margin: 0.25rem 0;
}

.quote-total {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    text-align: right;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Module Checkboxes */
#productModules label {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--card-background);
}

#productModules label:hover {
    border-color: var(--primary);
    background-color: #eff6ff;
}

#productModules label input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

#productModules label strong {
    color: var(--text-primary);
    font-weight: 500;
}

#productModules label small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Hamburger Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.mobile-menu-btn:hover {
    background: var(--background);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .dashboard-grid.charts-side-by-side {
        grid-template-columns: 1fr;
    }
    
    .pipeline-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Sidebar */
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Top Bar */
    .top-bar {
        left: 0;
        padding: 0 1rem 0 4rem;
    }
    
    .top-bar-right {
        gap: 0.5rem;
    }
    
    .user-menu-btn span:not(.user-avatar) {
        display: none;
    }
    
    /* Main Content */
    .main-content {
        margin-left: 0;
        padding: 1rem;
        margin-top: 64px;
    }
    
    /* Page Header */
    .page-header {
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* Dashboard */
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .stat-content p {
        font-size: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-card.full-width {
        grid-column: 1;
    }
    
    .dashboard-section h2 {
        font-size: 1.25rem;
    }
    
    /* Tables - Convert to Cards on Mobile */
    .table-container {
        overflow-x: visible;
    }
    
    table {
        display: none;
    }
    
    .table-container::before {
        content: 'Tablo görünümü mobilde kart görünümüne dönüştürülmüştür.';
        display: none;
    }
    
    /* Table Card View (will be added via JS or CSS) */
    .table-card {
        display: block;
        background: var(--card-background);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow-sm);
    }
    
    .table-card-row {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border);
    }
    
    .table-card-row:last-child {
        border-bottom: none;
    }
    
    .table-card-label {
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.875rem;
    }
    
    .table-card-value {
        color: var(--text-primary);
        text-align: right;
        flex: 1;
        margin-left: 1rem;
    }
    
    .table-card-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem auto;
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.5rem;
    }
    
    .modal-content.large {
        width: 95%;
        max-width: 95%;
    }
    
    /* Quote Items */
    .quote-item-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quote-item-col-action {
        padding-top: 0;
    }
    
    /* Profile */
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .profile-info h2 {
        font-size: 1.5rem;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    /* Settings */
    .settings-section {
        padding: 1.5rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Dropdowns */
    .notification-dropdown {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
    }
    
    .user-menu-dropdown {
        right: 1rem;
        left: auto;
        width: calc(100vw - 2rem);
        max-width: 300px;
    }
    
    /* Opportunities Cards */
    .opportunity-card {
        padding: 1rem;
    }
    
    .opportunity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .opportunity-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .opportunity-details-grid {
        grid-template-columns: 1fr;
    }
    
    /* Pipeline */
    .pipeline-container {
        grid-template-columns: 1fr;
    }
    
    .pipeline-column {
        max-height: 400px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-small {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Content Section */
    .content-section {
        padding: 1rem;
    }
    
    /* Login */
    .login-box {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0 0.5rem 0 3.5rem;
        height: 56px;
    }
    
    .main-content {
        margin-top: 56px;
        padding: 0.75rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .stat-content p {
        font-size: 1.25rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
}

/* Reminders */
.reminders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.reminder-card {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.reminder-card.overdue {
    border-left-width: 4px;
    animation: pulse 2s infinite;
}

.reminder-card.completed {
    opacity: 0.7;
    background: #f8f9fa;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-sm);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
    }
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.reminder-title {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.reminder-title strong {
    font-size: 1.125rem;
    color: var(--text-primary);
    word-break: break-word;
}

.reminder-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.reminder-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.reminder-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.reminder-note {
    background: #f0f9ff;
    border-left: 3px solid var(--primary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.reminder-note strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.reminder-note p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.reminder-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--background);
    gap: 0.75rem;
}

.filters-container {
    background: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filters-container .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .reminders-grid {
        grid-template-columns: 1fr;
    }
    
    .reminder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .reminder-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reminder-footer .btn {
        width: 100%;
    }
    
    .filters-container {
        padding: 1rem;
    }
    
    .filters-container .form-group {
        min-width: 100%;
    }
}
