/* Helix CRM Custom Styles */

html {
    color-scheme: light;
}

/* Base Styles */
html, body {
    min-height: 100vh;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fc;
    color: #5a5c69;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}
/* main alanı tüm boş yeri kaplasın → footer sticky-bottom davranışı */
body > main {
    flex: 1 0 auto;
}
body > .helix-footer {
    flex-shrink: 0;
}

/* Helix Navbar */
.helix-navbar {
    background: #FFFFFF;
    height: 58px;
    min-height: 58px;
    padding: 0 1.25rem;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

/* Brand / Logo */
.helix-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-right: 1.5rem;
}
.helix-navbar .brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    letter-spacing: -0.5px;
}
.helix-navbar .brand-text {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 4px;
    display: inline-block;
}
.helix-navbar .brand-text span {
    color: #3B82F6;
}
.helix-navbar .brand-text::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6 0%, #60A5FA 100%);
    border-radius: 2px;
    transform: skewX(-20deg);
    transform-origin: left center;
}

/* Nav items */
.helix-navbar .navbar-nav .nav-item {
    margin: 0 1px;
}
.helix-navbar .navbar-nav .nav-link {
    color: #1F2937;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 0.875rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.helix-navbar .navbar-nav .nav-link:hover {
    color: #111827;
    background: #F3F4F6;
}

/* Active state */
.helix-navbar .navbar-nav .nav-link.active,
.helix-navbar .navbar-nav .nav-item.active .nav-link {
    color: #3B82F6;
    background: #EFF6FF;
    position: relative;
}
.helix-navbar .navbar-nav .nav-link.active::after,
.helix-navbar .navbar-nav .nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: #3B82F6;
    border-radius: 2px;
}

/* Nav icons (Lucide) */
.helix-navbar .nav-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Dropdown */
.helix-navbar .dropdown-menu {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
}
.helix-navbar .dropdown-menu .dropdown-item {
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.helix-navbar .dropdown-menu .dropdown-item:hover {
    background: #F3F4F6;
    color: #111827;
}

/* Right side container */
.helix-navbar .navbar-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Icon buttons (notifications, reminders etc.) */
.helix-navbar .nav-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6B7280;
    transition: all 0.15s ease;
    position: relative;
    text-decoration: none;
}
.helix-navbar .nav-icon-btn:hover {
    background: #F3F4F6;
    color: #111827;
}

/* WhatsApp icon button */
.helix-navbar .nav-icon-btn.whatsapp-btn {
    color: #22C55E;
}
.helix-navbar .nav-icon-btn.whatsapp-btn:hover {
    background: #F0FDF4;
    color: #16A34A;
}

/* Team chat button (filled blue) */
.helix-navbar .team-chat-btn {
    background: #3B82F6;
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}
.helix-navbar .team-chat-btn:hover {
    background: #2563EB;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* User profile */
.helix-navbar .user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.375rem 0.5rem;
    border-radius: 8px;
    margin-left: 0.25rem;
    text-decoration: none;
}
.helix-navbar .user-profile:hover {
    background: #F3F4F6;
}
.helix-navbar .user-profile::after {
    margin-left: 0.25rem;
    border-top-color: #6B7280;
}

/* Avatar */
.helix-navbar .user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
    text-transform: uppercase;
}

/* User info (name + role) */
.helix-navbar .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.helix-navbar .user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
}
.helix-navbar .user-role {
    font-size: 0.6875rem;
    color: #9CA3AF;
}

/* Notification badge */
.helix-navbar .notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: #EF4444;
    border-radius: 8px;
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Animated new-message dot */
.navbar-new-msg-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0.8; }
}

/* Vertical divider */
.helix-navbar .nav-divider {
    width: 1px;
    height: 24px;
    background: #E5E7EB;
    margin: 0 0.75rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 10px 10px 0 0 !important;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    border: none;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #d1d3e2;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    background-color: #f8f9fc;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Statistics Cards */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

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

/* Phone Links */
.phone-link {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.phone-link:hover {
    color: #1e7e34;
    text-decoration: underline !important;
}

/* Timeline for Lead Notes */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 10px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.timeline-marker {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #667eea;
}

.timeline-content {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Avatar Circles */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

/* Dashboard Stats */
.text-xs {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1c2c7 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Login Page */
.login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Loading Spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: -20px;
    }
    
    .timeline-marker {
        left: -25px;
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .d-grid .btn {
        margin-bottom: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .h3 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .card-header,
    .pagination {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Hover Effects */
.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Status Specific Colors */
.status-new {
    background-color: #007bff;
}

.status-contacted {
    background-color: #17a2b8;
}

.status-meeting {
    background-color: #ffc107;
}

.status-proposal {
    background-color: #fd7e14;
}

.status-closed {
    background-color: #28a745;
}

.status-cancelled {
    background-color: #dc3545;
}

/* Priority Colors */
.priority-low {
    background-color: #6c757d;
}

.priority-medium {
    background-color: #17a2b8;
}

.priority-high {
    background-color: #dc3545;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Utility Classes */
.text-primary-custom {
    color: #667eea !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.border-primary-custom {
    border-color: #667eea !important;
}

.shadow-custom {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(102, 126, 234, 0.15) !important;
}

.rounded-custom {
    border-radius: 10px !important;
}

/* Module Permission Icons */
.permission-icons i {
    margin: 0 3px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.permission-icons i:hover {
    transform: scale(1.2);
}

/* Module Headers in Permission Table */
.module-header {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    min-width: 60px;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 10px 5px;
}

@media (max-width: 768px) {
    .module-header {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        min-width: auto;
    }
}

/* Footer */
footer {
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
    margin-top: auto;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1c2c7 100%);
    border-left: 4px solid #dc3545;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Chart Containers */
.chart-area {
    position: relative;
    height: 400px;
    width: 100%;
}

.chart-pie {
    position: relative;
    height: 15rem;
    width: 100%;
}

/* Custom Select Dropdown */
.custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Tooltip Customization */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #667eea;
    border-radius: 6px;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #667eea;
}

.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #667eea;
}

.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #667eea;
}

.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #667eea;
}

/* Helix Footer (sticky-bottom + modern) -------------------------- */
.helix-footer {
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding: 0.875rem 1.25rem;
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 2rem;
}
.helix-footer .container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.4;
}
.helix-footer .footer-copy {
    font-weight: 600;
    color: #374151;
}
.helix-footer .footer-tagline {
    color: #6B7280;
}
.helix-footer .footer-divider {
    color: #D1D5DB;
}
.helix-footer .footer-link {
    color: #3B82F6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}
.helix-footer .footer-link:hover {
    color: #1D4ED8;
    text-decoration: underline;
}
@media (max-width: 575.98px) {
    .helix-footer {
        padding: 0.75rem 1rem;
        font-size: 0.7rem;
    }
}
