/**
 * İş Yönetim Sistemi
 * Beyaz Tonları - Modern ve Sade Tasarım
 */

/* Genel Ayarlar - Light Mode */
:root {
    --primary-color: #ffffff;
    --secondary-color: #EFE9E3;
    --sidebar-color: #ffffff;
    --sidebar-hover: #f8f9fa;
    --sidebar-text: #2c3e50;
    --sidebar-text-secondary: #7f8c8d;
    --accent-color: #4a90e2;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e0d9d0;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Dark Mode - Soft & Readable */
body.dark-mode {
    --primary-color: #2b2d31;
    --secondary-color: #1e1f22;
    --sidebar-color: #1a1b1e;
    --sidebar-hover: #2b2d31;
    --sidebar-text: #dbdee1;
    --sidebar-text-secondary: #949ba4;
    --accent-color: #5ca3e6;
    --text-primary: #dbdee1;
    --text-secondary: #949ba4;
    --border-color: #3f4147;
    --success-color: #3ba55d;
    --error-color: #ed4245;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
}

body.dark-mode {
    background-color: #1e1f22;
    color: var(--text-primary);
}

body.dark-mode .main-content {
    background-color: #1e1f22;
}

body.dark-mode .dashboard-container {
    background-color: #1e1f22;
}

/* Dark Mode - Specific Elements */
body.dark-mode .login-container {
    background: #1e1f22;
}

body.dark-mode .login-form-container,
body.dark-mode .dashboard-card,
body.dark-mode .content-header,
body.dark-mode .stat-card,
body.dark-mode .stock-item-card {
    background-color: var(--primary-color);
}

body.dark-mode .data-table thead th {
    background: var(--secondary-color);
    color: var(--text-primary);
}

body.dark-mode .quick-btn-blue {
    background: rgba(92, 163, 230, 0.15);
    color: #5ca3e6;
    border-color: rgba(92, 163, 230, 0.3);
}

body.dark-mode .quick-btn-green {
    background: rgba(59, 165, 93, 0.15);
    color: #3ba55d;
    border-color: rgba(59, 165, 93, 0.3);
}

body.dark-mode .quick-btn-yellow {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.3);
}

body.dark-mode .quick-btn-cyan {
    background: rgba(0, 180, 219, 0.15);
    color: #00b4db;
    border-color: rgba(0, 180, 219, 0.3);
}

body.dark-mode .badge-info {
    background: rgba(92, 163, 230, 0.15);
    color: #5ca3e6;
    border-color: rgba(92, 163, 230, 0.3);
}

body.dark-mode .badge-success {
    background: rgba(59, 165, 93, 0.15);
    color: #3ba55d;
    border-color: rgba(59, 165, 93, 0.3);
}

body.dark-mode .badge-warning {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.3);
}

body.dark-mode .badge-gray {
    background: var(--secondary-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

body.dark-mode .status-badge {
    background: rgba(92, 163, 230, 0.15);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-mode .alert-info {
    background: rgba(92, 163, 230, 0.15);
    color: #5ca3e6;
    border-color: rgba(92, 163, 230, 0.3);
}

body.dark-mode .menu-item:nth-child(odd) {
    background-color: #25262b;
}

body.dark-mode .menu-item:nth-child(even) {
    background-color: var(--primary-color);
}

body.dark-mode .menu-item:hover,
body.dark-mode .menu-item.active {
    background-color: rgba(92, 163, 230, 0.15);
}

body.dark-mode .stat-icon {
    background: var(--secondary-color);
}

body.dark-mode .quick-access-card {
    background: var(--primary-color);
    border-color: var(--border-color);
}

body.dark-mode .quick-access-card:hover {
    border-color: var(--accent-color);
    background: rgba(92, 163, 230, 0.05);
}

body.dark-mode .info-box {
    background: rgba(92, 163, 230, 0.1);
    border-color: rgba(92, 163, 230, 0.3);
}

body.dark-mode .stock-item {
    background: var(--primary-color);
    border-color: var(--border-color);
}

body.dark-mode .stock-item:hover {
    border-color: var(--accent-color);
}

body.dark-mode .modal-content {
    background: var(--primary-color);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--border-color);
}

body.dark-mode .modal-footer {
    border-top-color: var(--border-color);
}

body.dark-mode .form-control {
    background: var(--secondary-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .form-control:focus {
    background: var(--primary-color);
}

body.dark-mode .company-badge {
    background: rgba(92, 163, 230, 0.15);
    border-color: rgba(92, 163, 230, 0.3);
}

body.dark-mode .control-btn {
    background: var(--secondary-color);
    border-color: var(--border-color);
}

body.dark-mode .control-btn:hover {
    background: var(--primary-color);
}

body.dark-mode .btn-logout {
    background: transparent;
    border-color: var(--border-color);
}

body.dark-mode .btn-logout:hover {
    background: rgba(237, 66, 69, 0.1);
    border-color: var(--error-color);
}

body.dark-mode .shipment-item-row,
body.dark-mode .product-row {
    background: var(--primary-color) !important;
}

body.dark-mode .card-header {
    background: var(--primary-color);
}

body.dark-mode select.form-control,
body.dark-mode textarea.form-control,
body.dark-mode input.form-control {
    background: var(--secondary-color);
    color: var(--text-primary);
}

body.dark-mode select.form-control option {
    background: var(--primary-color);
    color: var(--text-primary);
}

body.dark-mode .data-table tbody tr:hover {
    background: rgba(92, 163, 230, 0.05);
}

body.dark-mode .action-btn {
    background: var(--secondary-color);
    border-color: var(--border-color);
}

body.dark-mode .action-btn:hover {
    background: var(--primary-color);
}

body.dark-mode .btn-primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

body.dark-mode .btn-secondary {
    background: var(--secondary-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .btn-link {
    color: var(--accent-color);
}

body.dark-mode .btn-link:hover {
    background: rgba(92, 163, 230, 0.1);
}

body.dark-mode .stat-icon {
    background: var(--secondary-color) !important;
}

body.dark-mode .btn-icon-only {
    background: var(--secondary-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .modal-close {
    background: var(--secondary-color);
    color: var(--text-primary);
}

body.dark-mode .modal-close:hover {
    background: var(--border-color);
}

body.dark-mode .tabs {
    border-bottom-color: var(--border-color);
}

body.dark-mode .tab-btn {
    color: var(--text-secondary);
}

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

body.dark-mode .tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

body.dark-mode .product-card {
    background: var(--primary-color);
    border-color: var(--border-color);
}

body.dark-mode .product-card.active {
    background: rgba(92, 163, 230, 0.1);
}

body.dark-mode #deleteModal .modal-header {
    background: rgba(237, 66, 69, 0.15);
    border-bottom-color: rgba(237, 66, 69, 0.3);
}

body.dark-mode .alert-success {
    background: rgba(59, 165, 93, 0.15);
    color: #3ba55d;
    border-color: rgba(59, 165, 93, 0.3);
}

body.dark-mode .alert-error {
    background: rgba(237, 66, 69, 0.15);
    color: #ed4245;
    border-color: rgba(237, 66, 69, 0.3);
}

/* Sidebar Dark Mode */
body.dark-mode .sidebar {
    background: #2b2d31;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    border-right: 1px solid #3f4147;
}

body.dark-mode .sidebar-header {
    border-bottom-color: var(--border-color);
}

body.dark-mode .sidebar-footer {
    border-top-color: var(--border-color);
}

body.dark-mode .menu-category {
    color: var(--text-secondary);
}

body.dark-mode .user-avatar {
    background: var(--accent-color);
}

body.dark-mode .settings-icon {
    color: var(--text-secondary);
}

body.dark-mode .settings-icon:hover {
    background: var(--secondary-color);
    color: var(--accent-color);
}

body.dark-mode #floatingToggle {
    background: var(--accent-color);
}

body.dark-mode .notification-badge {
    background: var(--error-color);
}

/* Logo Dark Mode */
body.dark-mode .sidebar-header img {
    filter: brightness(0) invert(1);
}

/* Sevkiyat Popup Dark Mode */
body.dark-mode #orderSummary,
body.dark-mode #orderInfo,
body.dark-mode #orderInfo > div {
    background: var(--secondary-color) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.dark-mode #orderStats {
    color: var(--text-secondary) !important;
}

body.dark-mode #orderStats strong {
    color: var(--text-primary) !important;
}

body.dark-mode .shipment-item-row {
    background: var(--primary-color) !important;
    border-color: var(--border-color) !important;
}

/* Table Controls Dark Mode */
body.dark-mode .dashboard-card > div[style*="padding: 1rem"] {
    background: var(--secondary-color) !important;
}

body.dark-mode .dashboard-card > div[style*="background: white"] {
    background: var(--secondary-color) !important;
}

body.dark-mode .filter-form {
    background: transparent;
}

body.dark-mode hr {
    border-color: var(--border-color) !important;
}

body.dark-mode small.text-muted {
    color: var(--text-secondary);
}

body.dark-mode strong {
    color: var(--text-primary);
}

/* Table Total Row Dark Mode */
body.dark-mode tr[style*="background: #fff8e6"],
body.dark-mode tr[style*="background: var(--secondary-color)"] {
    background: var(--secondary-color) !important;
}

body.dark-mode tbody tr[style*="font-weight: 600"],
body.dark-mode tbody tr[style*="font-weight: bold"] {
    background: var(--secondary-color) !important;
}

body.dark-mode .data-table tbody tr:last-child {
    background: var(--secondary-color);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #EFE9E3;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Mobile optimizations */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    overflow-x: hidden;
    width: 100%;
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Prevent pull-to-refresh on mobile */
html, body {
    overscroll-behavior-y: none;
}

/* Giriş Sayfası */
.login-container {
    display: flex;
    min-height: 100vh;
    background: #EFE9E3;
}

.login-image {
    flex: 1;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
}

.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-image: 
        linear-gradient(30deg, rgba(0, 180, 219, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(0, 180, 219, 0.05) 87.5%, rgba(0, 180, 219, 0.05)),
        linear-gradient(150deg, rgba(0, 180, 219, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(0, 180, 219, 0.05) 87.5%, rgba(0, 180, 219, 0.05)),
        linear-gradient(30deg, rgba(0, 180, 219, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(0, 180, 219, 0.05) 87.5%, rgba(0, 180, 219, 0.05)),
        linear-gradient(150deg, rgba(0, 180, 219, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(0, 180, 219, 0.05) 87.5%, rgba(0, 180, 219, 0.05)),
        linear-gradient(60deg, rgba(102, 126, 234, 0.03) 25%, transparent 25.5%, transparent 75%, rgba(102, 126, 234, 0.03) 75%, rgba(102, 126, 234, 0.03)),
        linear-gradient(60deg, rgba(102, 126, 234, 0.03) 25%, transparent 25.5%, transparent 75%, rgba(102, 126, 234, 0.03) 75%, rgba(102, 126, 234, 0.03));
    background-size: 80px 140px, 80px 140px, 80px 140px, 80px 140px, 80px 140px, 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
    animation: moveBackground 60s linear infinite;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    filter: blur(60px);
    animation: pulse 15s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #00b4db;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #667eea;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #764ba2;
    top: 40%;
    right: 20%;
    animation-delay: 10s;
}

.shape-4 {
    width: 450px;
    height: 450px;
    background: #00b4db;
    bottom: 30%;
    left: 15%;
    animation-delay: 7s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.05;
        transform: scale(1);
    }
    50% {
        opacity: 0.08;
        transform: scale(1.1);
    }
}

@keyframes moveBackground {
    0% {
        background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
    }
    100% {
        background-position: 80px 140px, 80px 140px, 120px 210px, 120px 210px, 80px 140px, 120px 210px;
    }
}

.login-image-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    max-width: 500px;
}

.login-image-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-image-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: white;
}

.login-box {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    animation: slideInRight 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.login-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Elemanları */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-control::placeholder {
    color: #bdc3c7;
}

/* Butonlar */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 180, 219, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 219, 0.5);
}

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

/* Alert Mesajları */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    background-color: #EFE9E3;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-color);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-240px);
}

/* Floating Toggle Button */
#floatingToggle {
    position: fixed;
    left: 0;
    bottom: 100px;
    width: 36px;
    height: 48px;
    background: var(--accent-color);
    border: none;
    border-radius: 0 6px 6px 0;
    color: white;
    cursor: pointer;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 12px rgba(74, 144, 226, 0.3);
    transition: all 0.2s ease;
}

#floatingToggle:hover {
    background: #3a7bc8;
    width: 40px;
}

#floatingToggle i {
    font-size: 1.1rem;
}

body.sidebar-collapsed #floatingToggle {
    display: flex;
}

.sidebar-menu::-webkit-scrollbar {
    width: 0;
    display: none;
}

.sidebar-menu {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-header img {
    display: block;
    margin: 0 auto;
}

.sidebar-header p {
    font-size: 0.8rem;
    color: var(--sidebar-text-secondary);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

/* Menü Kategorisi */
.menu-category {
    padding: 1rem 1rem 0.4rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--sidebar-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-category:first-child {
    margin-top: 0;
}

.menu-category i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem 0.7rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.875rem;
}

.menu-item:nth-child(odd) {
    background-color: transparent;
}

.menu-item:nth-child(even) {
    background-color: transparent;
}

.menu-item:hover {
    background-color: var(--sidebar-hover);
    border-left-color: var(--accent-color);
}

.menu-item.active {
    background-color: #e8f4fd;
    border-left-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 500;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
}

/* Control Buttons */
.control-btn {
    flex: 1;
    height: 40px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover {
    background: var(--secondary-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.control-btn i {
    font-size: 1rem;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--error-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.settings-icon {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
}

.settings-icon:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

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

.user-info h4 {
    font-size: 0.85rem;
    color: var(--sidebar-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info p {
    font-size: 0.7rem;
    color: var(--sidebar-text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 1rem;
    background-color: #EFE9E3;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    width: calc(100% - 240px);
    max-width: calc(100% - 240px);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Quick Access Cards */
.quick-access-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.quick-access-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.12);
    transform: translateY(-2px);
}

.quick-access-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.quick-access-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

.content-header {
    background-color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
}

.content-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.content-header p {
    color: var(--text-secondary);
}

/* Stats Cards */
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background-color: white;
    padding: 1.25rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.dashboard-left,
.dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.card-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.2s ease;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.btn-link:hover {
    background: var(--secondary-color);
    border-color: var(--border-color);
}

.btn-link i {
    font-size: 0.75rem;
}

.btn-icon-only {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-only:hover {
    background: var(--secondary-color);
    border-color: var(--accent-color);
}

.btn-icon-only i {
    font-size: 0.85rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.data-table thead th {
    background: white;
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-primary);
}

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

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1.5px solid;
}

.badge-info {
    background: #e8f4fd;
    color: var(--accent-color);
    border-color: #c5e0f7;
}

.badge-success {
    background: #e8f8f0;
    color: #27ae60;
    border-color: #c3e6d1;
}

.badge-warning {
    background: #fff8e6;
    color: #f39c12;
    border-color: #ffe8b3;
}

.badge-gray {
    background: var(--secondary-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.badge-lg {
    min-width: 36px;
    height: 36px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
}

.status-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.status-planning {
    background: #fff8e6;
    color: #856404;
    border-color: #ffe8b3;
}

/* Company Info */
.company-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.company-badge {
    width: 28px;
    height: 28px;
    background: var(--secondary-color);
    color: var(--accent-color);
    border: 1.5px solid #c5e0f7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Stock Summary */
.stock-summary {
    padding: 1.5rem;
}

.stock-item {
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.stock-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
}

.stock-label {
    font-weight: 400;
    color: var(--text-primary);
    font-size: 0.9rem;
    flex: 1;
}

.stock-count {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stock-count small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #e8f4fd;
    border: 1px solid #c5e0f7;
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 0.8rem;
    line-height: 1.5;
}

.info-box i {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--accent-color);
}

/* Quick Actions */
.quick-actions {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid;
}

.quick-btn i {
    font-size: 1.5rem;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-btn-blue {
    background: #e8f4fd;
    color: var(--accent-color);
    border-color: #c5e0f7;
}

.quick-btn-blue:hover {
    background: #d6ebfc;
}

.quick-btn-green {
    background: #e8f8f0;
    color: #27ae60;
    border-color: #c3e6d1;
}

.quick-btn-green:hover {
    background: #d4f3e3;
}

.quick-btn-yellow {
    background: #fff8e6;
    color: #f39c12;
    border-color: #ffe8b3;
}

.quick-btn-yellow:hover {
    background: #fff3d6;
}

.quick-btn-cyan {
    background: #e6f7fb;
    color: #00b4db;
    border-color: #b3e5f0;
}

.quick-btn-cyan:hover {
    background: #d6f2f8;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid,
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Prevent Horizontal Scroll */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .dashboard-container {
        overflow-x: hidden;
        width: 100%;
    }
    
    .main-content {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Login Page */
    .login-container {
        flex-direction: column;
        overflow-x: hidden;
    }
    
    .login-image {
        min-height: 200px;
        padding: 2rem 1rem;
    }
    
    .login-image-content {
        max-width: 100%;
    }
    
    .login-image-content h1 {
        font-size: 2rem;
    }
    
    .login-image-content img {
        width: 140px !important;
    }
    
    .login-image-content p {
        font-size: 0.9rem;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    /* Sidebar - Full Screen Overlay with better mobile experience */
    .sidebar {
        width: 280px;
        max-width: 85vw;
        position: fixed;
        height: 100vh;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        box-shadow: 4px 0 15px rgba(0,0,0,0.3);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    body:not(.sidebar-collapsed) .sidebar {
        transform: translateX(0);
    }
    
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    
    /* Mobile Overlay - Clickable to close sidebar */
    body:not(.sidebar-collapsed)::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
        animation: fadeIn 0.3s ease-out;
    }
    
    /* Floating Toggle - Always Visible on Mobile */
    #floatingToggle {
        display: flex !important;
        left: 10px;
        top: 10px;
        bottom: auto;
        z-index: 10001;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    body:not(.sidebar-collapsed) #floatingToggle {
        left: 10px;
    }
    
    body:not(.sidebar-collapsed) #floatingToggle i {
        transform: rotate(180deg);
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 60px 1rem 1rem 1rem;
        width: 100%;
        min-height: 100vh;
    }
    
    /* Grid Layouts */
    .stats-grid-4 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    /* Hızlı Erişim - 2x2 Grid */
    .quick-access-card:nth-child(1),
    .quick-access-card:nth-child(2),
    .quick-access-card:nth-child(3),
    .quick-access-card:nth-child(4) {
        grid-column: auto;
    }
    
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .quick-access-card {
        padding: 1.25rem 1rem;
    }
    
    .quick-access-card i {
        font-size: 1.75rem;
    }
    
    .quick-access-card span {
        font-size: 0.85rem;
    }
    
    /* Tables - Enhanced Mobile Support */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .data-table {
        font-size: 0.75rem;
        min-width: 600px;
        width: 100%;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .data-table th:first-child,
    .data-table td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 1;
    }
    
    .data-table thead th:first-child {
        background: white;
        z-index: 2;
    }
    
    body.dark-mode .data-table thead th:first-child {
        background: var(--secondary-color);
    }
    
    body.dark-mode .data-table td:first-child {
        background: var(--primary-color);
    }
    
    .dashboard-card {
        overflow: hidden;
        max-width: 100%;
    }
    
    /* Table Actions */
    .action-buttons {
        gap: 0.25rem;
        flex-wrap: nowrap;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        padding: 0;
    }
    
    /* Cards */
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.75rem !important;
    }
    
    .stat-card h3 {
        font-size: 0.8rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-header > div:last-child {
        width: 100%;
        justify-content: flex-start;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 85vh;
        margin: auto;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(85vh - 140px);
    }
    
    .modal-footer {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    /* Forms */
    .form-grid,
    .filter-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    /* Stock Grid */
    .stock-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .stock-item-card {
        padding: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        gap: 0.375rem;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .btn-icon-only {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Sidebar Footer */
    .sidebar-footer {
        padding: 0.75rem;
    }
    
    .control-btn {
        height: 36px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .user-info h4 {
        font-size: 0.8rem;
    }
    
    .user-info p {
        font-size: 0.65rem;
    }
    
    .btn-logout {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Tabs */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: thin;
    }
    
    .tab-btn {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.75rem 1.25rem;
    }
    
    /* Badge'ler */
    .badge {
        font-size: 0.7rem;
        padding: 0 0.4rem;
        min-width: 22px;
        height: 22px;
    }
    
    .badge-lg {
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    /* Product Cards */
    .product-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        padding: 1rem;
    }
    
    /* Content Header */
    .content-header {
        padding: 1.5rem 1rem;
    }
    
    .content-header h2 {
        font-size: 1.5rem;
    }
    
    /* Export Buttons */
    .btn-icon-only i {
        font-size: 0.9rem;
    }
    
    /* Notification Items */
    .notification-item {
        padding: 1rem;
    }
    
    /* Quick Buttons - Dashboard */
    .quick-btn {
        padding: 1.25rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .quick-btn i {
        font-size: 1.25rem;
    }
    
    /* Inline Grid Overrides */
    div[style*="display: grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(4, 1fr)"],
    div[style*="grid-template-columns: repeat(3, 1fr)"],
    div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Product Row - Sipariş Formu */
    .product-row,
    .shipment-item-row {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    /* Company Info */
    .company-info {
        font-size: 0.85rem;
    }
    
    /* Stock Numbers */
    .stock-numbers {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    /* Stats Grid Override */
    .stats-grid-4,
    div[class*="stats-grid"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Dashboard Left/Right */
    .dashboard-left,
    .dashboard-right {
        width: 100%;
    }
    
    /* Export Buttons Container */
    div[style*="display: flex"][style*="gap: 0.5rem"] button,
    div[style*="display: flex"][style*="gap: 0.5rem"] a {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    /* Filter Grid Special */
    .filter-grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Badge Adjustments */
    .status-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.75rem;
    }
    
    /* Info Box */
    .info-box {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    /* Chart.js Canvas */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Better Touch Targets for Mobile */
    button, a, input, select, textarea {
        min-height: 44px;
    }
    
    button, a.btn {
        padding: 0.75rem 1rem !important;
    }
    
    /* Prevent Text Size Adjustment */
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Better form styling on mobile */
    .form-control,
    select.form-control,
    textarea.form-control,
    input.form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.875rem !important;
    }
    
    /* Modal improvements */
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-body {
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better spacing for mobile */
    .content-header {
        margin-bottom: 1rem;
    }
    
    /* Image responsive */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Horizontal scroll indicator */
    .table-responsive::after {
        content: '← Kaydırın →';
        position: sticky;
        right: 0;
        bottom: 0;
        background: rgba(74, 144, 226, 0.9);
        color: white;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        border-radius: 4px 0 0 0;
        display: inline-block;
        pointer-events: none;
    }
    
    /* Hide scroll indicator when at the end */
    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--accent-color);
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: var(--border-color);
    }
}

/* Mobile Performance Enhancements */
@media (max-width: 768px) {
    /* Reduce animations for better performance */
    * {
        animation-duration: 0.15s !important;
        transition-duration: 0.15s !important;
    }
    
    /* Optimize fonts */
    body {
        text-rendering: optimizeSpeed;
    }
    
    /* Better select styling */
    select.form-control {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 12px;
        padding-right: 2.5rem !important;
    }
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 700px;
    }
}

/* Laptop Responsive (1025px - 1400px) - Planning ve genel sayfalar için */
@media (min-width: 1025px) and (max-width: 1400px) {
    .main-content {
        padding: 1.5rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .dashboard-container {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* İstatistik kartları - 2x2 grid */
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Tablo responsive - horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .data-table {
        min-width: 1200px;
        width: 100%;
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Dashboard card padding azalt */
    .dashboard-card {
        padding: 1.25rem;
    }
    
    .card-header {
        padding: 1rem 0;
    }
    
    /* Form grid - 2 sütun */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Geniş Laptop ve Desktop (1401px+) - Planning sayfası için özel */
@media (min-width: 1401px) {
    .main-content {
        max-width: 100%;
        padding: 2rem;
        box-sizing: border-box;
    }
    
    .table-responsive {
        overflow-x: auto;
        width: 100%;
    }
    
    .data-table {
        width: 100%;
        min-width: auto;
    }
}

/* Planning sayfası için özel responsive düzenlemeler */
.planning-page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.planning-stats {
    width: 100%;
    max-width: 100%;
}

.planning-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1600px) {
    /* Planning tablosu için özel düzenlemeler */
    .planning-table,
    #planningTable {
        font-size: 0.8rem;
    }
    
    .planning-table th,
    .planning-table td,
    #planningTable th,
    #planningTable td {
        padding: 0.65rem 0.4rem;
    }
    
    /* Badge boyutları küçült */
    .planning-table .badge,
    #planningTable .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Status badge */
    .planning-table .status-badge,
    #planningTable .status-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        white-space: nowrap;
    }
    
    /* Action button */
    .planning-table .action-btn,
    #planningTable .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Planning sayfası - Geniş ekranlar için */
@media (min-width: 1601px) {
    .planning-page {
        padding: 2rem;
    }
    
    .planning-table-wrapper {
        overflow-x: visible;
    }
    
    .planning-table,
    #planningTable {
        width: 100%;
        table-layout: auto;
    }
}

/* Küçük laptop ekranları (1025px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .main-content {
        padding: 1.25rem;
    }
    
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 0.85rem;
    }
    
    .table-responsive {
        margin: 0 -1.25rem;
        padding: 0 1.25rem;
    }
    
    .data-table {
        min-width: 1100px;
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.65rem 0.4rem;
    }
    
    .card-header {
        padding: 1rem 0;
        flex-wrap: wrap;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
}

/* Yardımcı Sınıflar */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.text-muted {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

small.text-muted {
    display: block;
    margin-top: 0.25rem;
}

.btn-logout {
    background-color: transparent;
    color: var(--error-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    width: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-logout i {
    font-size: 0.85rem;
}

.btn-logout:hover {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: none;
}

/* Filter Form */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-grid .form-group,
.filter-grid .form-group {
    margin-bottom: 0;
}

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

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

select.form-control {
    cursor: pointer;
}

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

/* Action Buttons */
.action-buttons {
    display: inline-flex;
    gap: 0.5rem;
}

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

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

.action-btn-view {
    color: var(--accent-color);
}

.action-btn-view:hover {
    background: #e8f4fd;
    border-color: var(--accent-color);
}

.action-btn-edit {
    color: #f39c12;
}

.action-btn-edit:hover {
    background: #fff8e6;
    border-color: #f39c12;
}

.action-btn-stock {
    color: #27ae60;
}

.action-btn-stock:hover {
    background: #e8f8f0;
    border-color: #27ae60;
}

.action-btn-delete {
    color: var(--error-color);
}

.action-btn-delete:hover {
    background: #fee;
    border-color: var(--error-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideDown 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

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

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

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

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

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

.btn-secondary:hover {
    background: var(--border-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 500;
}

.tab-content {
    display: none;
}

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

/* Stock Grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.stock-item-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.stock-item-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stock-item-card.critical {
    border-color: #ffcccc;
    background: #fff8f8;
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.stock-card-header h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.stock-menu-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--secondary-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

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

.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.stock-numbers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stock-current {
    flex: 1;
}

.stock-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stock-value-small {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: #f39c12;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stock-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stock-description {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--secondary-color);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.stock-description i {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.stock-progress {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #27ae60;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-bar.critical {
    background: var(--error-color);
}

/* Product Cards Grid */
.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.12);
    transform: translateY(-2px);
}

.product-card.active {
    border-color: var(--accent-color);
    background: #e8f4fd;
    border-width: 2px;
}

.product-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.product-card-header i {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.product-badge {
    min-width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.product-card-stats {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

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

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

.stat-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Responsive için */
@media (max-width: 1200px) {
    .stock-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .product-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .filter-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .stock-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .quick-access-card {
        padding: 1rem;
    }
    
    .quick-access-card i {
        font-size: 1.5rem;
    }
}

