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

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --qrm1-color: #4ab05e;
    --sidebar-bg: #1a1d29;
    --sidebar-bg-secondary: #252a3a;
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.min-vh-100 {
    min-height: 100vh;
}

.card {
    border-radius: 15px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.currency-badge {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.language-badge {
    font-weight: 500;
}

.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease-in-out;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#restaurantSelector {
    transition: all 0.3s ease;
    font-size: 0.875rem;
    min-width: 120px; 
    max-width: 250px; 
    width: auto;
}

@media (max-width: 576px) {
    #restaurantSelector {
        min-width: 100px !important;
        max-width: 140px !important;
        font-size: 0.8rem;
    }
    
    .navbar-nav .nav-item.dropdown {
        margin-right: 0.5rem !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    #restaurantSelector {
        min-width: 130px !important;
        max-width: 170px !important;
        font-size: 0.85rem;
    }
}

@media (min-width: 769px) {
    #restaurantSelector {
        min-width: 150px !important;
        max-width: 220px !important;
    }
}

#restaurantSelector:focus {
    border-color: #4dabf7 !important;
    box-shadow: 0 0 0 0.2rem rgba(77, 171, 247, 0.25) !important;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}
.navbar-brand img {
    max-height: 32px !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"));
}

@media (max-width: 991.98px) {
    .navbar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .navbar-brand {
        font-size: 1.25rem;
        padding-left: 0.5rem !important;
    }
    #restaurantSelector {
        min-width: 120px !important;
        font-size: 0.875rem;
    }
    .navbar-nav .nav-item .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar-brand img {
        max-height: 38px !important;
    }
    #restaurantSelector {
        min-width: 120px !important;
        font-size: 0.75rem;
    }
    .navbar-nav .nav-item .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    .btn-toolbar .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    .navbar-toggler {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0.25rem 0.5rem;
        border: none;
        order: -1;
    }
}

.sidebar {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-bg-secondary) 100%);
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    margin: 0.25rem 0.5rem;
    transition: all 0.3s ease-in-out;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar .sidebar-heading {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dashboard-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: var(--light-color);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

.qr-code-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    text-align: center;
}

.qr-code-container canvas {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.image-upload {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.2s ease-in-out;
    cursor: pointer;
}

.image-upload:hover {
    border-color: var(--primary-color);
}

.image-upload.dragover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        /* top: 56px; */
        left: -60%;
        width: 60%;
        height: calc(100vh - 56px);
        z-index: 1040;
        transition: left 0.3s ease-in-out;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
    .sidebar.show {
        left: 0;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .dashboard-card {
        margin-bottom: 1rem;
    }
    .table-responsive {
        font-size: 0.875rem;
    }
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
        order: -1;
    }
    .navbar-toggler:focus {
        box-shadow: none;
    }
    .navbar-brand {
        flex: 1;
    }
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1039;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
    }
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

/* Extra responsive logo styles for very small devices */
@media (max-width: 480px) {
    .navbar-brand img {
        max-height: 40px !important;
    }
}

@media (max-width: 380px) {
    .navbar-brand img {
        max-height: 42px !important;
    }
}

@media (max-width: 576px) {
    .sidebar {
        left: -70% !important;
        width: 70% !important;
        position: fixed !important;
        height: calc(100vh - 56px) !important;
        z-index: 1040 !important;
        transition: left 0.3s ease-in-out !important;
    }
    .sidebar.show {
        left: 0 !important;
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* ===== ERROR PAGES ===== */
/* 403 ve 404 sayfaları için özel stiller */
.error-section {
    background: var(--homepage-dark-bg, #0f0f0f);
    position: relative;
    overflow: hidden;
}

.error-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="white" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.error-content {
    position: relative;
    z-index: 2;
}

.error-main-icon {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.error-title {
    font-size: 6rem;
    font-weight: 700;
    color: var(--homepage-text-light, #ffffff);
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    line-height: 1;
}

.error-subtitle {
    font-size: 2.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.error-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.error-info-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.error-info-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.error-info-icon {
    font-size: 2rem;
    color: var(--homepage-primary, #6366f1);
    margin-bottom: 1rem;
}

.error-info-card h5 {
    color: var(--homepage-text-light, #ffffff);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-info-card p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.9rem;
}

.error-actions {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.search-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.search-suggestions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.suggestion-link {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.suggestion-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--homepage-text-light, #ffffff);
    transform: translateY(-2px);
}

.help-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

.help-link {
    color: var(--homepage-text-light, #ffffff);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--homepage-text-light, #ffffff);
    text-decoration-color: var(--homepage-text-light, #ffffff);
}

/* Responsive tasarım - error sayfaları için */
@media (max-width: 768px) {
    .error-title {
        font-size: 4rem;
    }
    
    .error-subtitle {
        font-size: 1.8rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .error-main-icon {
        font-size: 5rem;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .error-actions .btn-primary-custom {
        width: fit-content;
        margin: 0;
    }
    
    .search-suggestions {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-link {
        width: fit-content;
    }
}

@media (max-width: 576px) {
    .error-title {
        font-size: 3rem;
    }
    
    .error-subtitle {
        font-size: 1.5rem;
    }
    
    .error-main-icon {
        font-size: 4rem;
    }
    
    .error-info-card {
        padding: 1rem;
    }
}

@media print {
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
}

.page-content {
    line-height: 1.8;
}

.page-content h1, .page-content h2, .page-content h3, 
.page-content h4, .page-content h5, .page-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.page-content p {
    margin-bottom: 1.2rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.page-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    padding: 1rem;
    border-radius: 0.375rem;
}

.page-content ul, .page-content ol {
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.page-content table th,
.page-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.page-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.image-preview {
    max-width: 200px;
}

.image-column-header {
    width: 80px;
}

.image-thumbnail-cell {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.image-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
}

.image-placeholder i {
    font-size: 24px;
}

.search-input-menu {
    width: 200px;
}

.draggable-row {
    transition: opacity 0.3s ease, background-color 0.2s ease;
}

.draggable-row[draggable="true"] {
    cursor: grabbing;
}

.draggable-row.dragging {
    opacity: 0.5;
    background-color: rgba(13, 110, 253, 0.05);
}

.draggable-row.drag-over {
    background-color: rgba(13, 110, 253, 0.15);
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.drag-handle {
    cursor: grab !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.drag-handle:active {
    cursor: grabbing !important;
}

.drag-handle:hover {
    background-color: rgba(13, 110, 253, 0.05);
    border-radius: 4px;
}

.drag-handle:hover i {
    color: var(--primary-color) !important;
    transform: scale(1.3);
    transition: all 0.2s ease;
}

.drag-handle-disabled {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.drag-handle-disabled:hover {
    background-color: transparent !important;
}

.drag-handle-disabled:hover i {
    transform: none !important;
    color: inherit !important;
}

.non-sortable {
    background-color: rgba(108, 117, 125, 0.05);
}

.category-header-row {
    background-color: #f8f9fa !important;
    border-top: 2px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.category-header-row td {
    font-size: 0.95rem;
    color: #495057;
    letter-spacing: 0.3px;
    user-select: none;
}

.category-header-row:hover {
    background-color: #e9ecef !important;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(13, 110, 253, 0.1);
}

.sortable-ghost td {
    border-color: var(--primary-color);
}

.allergen-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.5rem;
    padding: 0.6rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.allergen-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    min-height: 65px;
}

.allergen-checkbox:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.allergen-checkbox.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

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

.allergen-checkbox .allergen-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.allergen-checkbox .allergen-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.2;
}

.allergen-checkbox.selected .allergen-name {
    color: #0d6efd;
    font-weight: 600;
}

@media (max-width: 768px) {
    .allergen-selection {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 0.45rem;
        padding: 0.5rem;
    }
    
    .allergen-checkbox {
        padding: 0.45rem;
        min-height: 60px;
    }
    
    .allergen-checkbox .allergen-icon {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
    
    .allergen-checkbox .allergen-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .allergen-selection {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 0.4rem;
        padding: 0.45rem;
    }
    
    .allergen-checkbox {
        padding: 0.35rem;
        min-height: 55px;
    }
    
    .allergen-checkbox .allergen-icon {
        width: 24px;
        height: 24px;
        font-size: 0.95rem;
    }
}