/* assets/css/style.css */

/* Global Reset & Styling System */
:root {
    --primary: #1b3a70;
    --primary-light: #3b5b95;
    --primary-dark: #0f244c;
    --secondary: #fbc531;
    --secondary-light: #ffe066;
    --secondary-dark: #c49000;
    --dark: #0c1b3a;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --text-main: #37474f;
    --text-muted: #78909c;
    --border: #e0e0e0;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(211, 47, 47, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.content-wrapper {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
}

/* Navbar Styling */
.navbar-wrapper {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-svg {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.5px;
    text-transform: lowercase;
}

.brand-sub {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 10px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

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

.nav-link:hover, .nav-link.active {
    background-color: rgba(27, 58, 112, 0.08);
    color: var(--primary);
    font-weight: 600;
}

/* Footer Styling */
.footer-wrapper {
    background-color: var(--dark);
    color: var(--white);
    padding: 30px 15px;
    margin-top: auto;
    border-top: 4px solid var(--secondary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info p {
    margin-bottom: 5px;
}

.footer-tagline {
    font-size: 13px;
    color: var(--secondary);
    font-style: italic;
}

.view-counter {
    background-color: rgba(255,255,255,0.08);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.view-counter i {
    color: var(--secondary);
}

/* Pulsing effect for icons */
.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Home / Welcome Page Components */
.hero-section {
    background: linear-gradient(135deg, rgba(27,58,112,0.95), rgba(12,27,58,0.90)), url('https://images.unsplash.com/photo-1548550022-c3f5ebf86915?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 60px 40px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255, 152, 0, 0.15) 0%, transparent 40%);
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: rgba(255, 255, 255, 0.9);
}

.hero-stats {
    display: inline-flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.hero-stat-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

/* Feature Panel Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.panel-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.panel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background-color: var(--border);
    transition: var(--transition);
}

.panel-card.primary-card::before { background-color: #2980b9; }
.panel-card.secondary-card::before { background-color: #27ae60; }
.panel-card.orange-card::before { background-color: #d35400; }
.panel-card.red-card::before { background-color: #d32f2f; }

.panel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.panel-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--white);
}

.panel-card.primary-card .panel-icon-wrapper { background-color: #2980b9; }
.panel-card.secondary-card .panel-icon-wrapper { background-color: #27ae60; }
.panel-card.orange-card .panel-icon-wrapper { background-color: #d35400; }
.panel-card.red-card .panel-icon-wrapper { background-color: #d32f2f; }

.panel-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.panel-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
    flex: 1;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--white);
    transition: var(--transition);
}

.panel-card.primary-card .btn-card { background-color: #2980b9; }
.panel-card.secondary-card .btn-card { background-color: #27ae60; }
.panel-card.orange-card .btn-card { background-color: #d35400; }
.panel-card.red-card .btn-card { background-color: #d32f2f; }

.btn-card:hover {
    filter: brightness(0.9);
}

/* Info Cards Block */
.info-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
}

.section-title i {
    color: var(--primary);
}

/* Table Design */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
}

th, td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: #f8f9fa;
    color: var(--dark);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* General Interactive Forms Styles */
.card-wrapper {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.form-grid-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}

input, select, textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.btn-styled {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-styled:hover {
    background-color: var(--primary-dark);
}

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

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

.btn-styled.danger-btn {
    background-color: #d32f2f;
}

/* Custom styles for specific sub-pages */

/* 1. Plasiyer Dağıtım Mobil styles */
.distribution-header {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.driver-qty-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.driver-item {
    background-color: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    flex: 1 1 80px;
}

.driver-item label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.driver-item input {
    width: 60px;
    text-align: center;
    margin: 0 auto;
    font-weight: bold;
}

.sip-cell {
    color: var(--text-muted);
    font-size: 10px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 2px;
}

.dag-cell {
    font-weight: bold;
    color: var(--dark);
    background-color: #e8f5e9;
    padding: 6px;
    border-radius: 4px;
    display: inline-block;
    min-width: 40px;
}

/* 2. Söküm Takip Paneli styles */
.summary-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.summary-metric-card {
    border-radius: var(--border-radius);
    padding: 20px;
    color: var(--white);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.metric-card-primary { background: linear-gradient(135deg, #2c3e50, #34495e); }
.metric-card-orange { background: linear-gradient(135deg, #d35400, #e67e22); }
.metric-card-green { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.metric-card-blue { background: linear-gradient(135deg, #2980b9, #3498db); }

.summary-metric-card span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.summary-metric-card h3 {
    font-size: 28px;
    margin-top: 5px;
    color: var(--white);
}

/* 3. Sipariş Takip Pro styles */
.order-setup-panel {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.order-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.product-item-card {
    background-color: var(--white);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: var(--transition);
}

.product-item-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
}

.btn-delete-x {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-delete-x:hover {
    background-color: var(--primary-dark);
}

.product-label {
    flex: 1;
    font-weight: 700;
    font-size: 13px;
    color: var(--dark);
    text-align: left;
    margin: 0;
    text-transform: uppercase;
}

.product-inputs-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.product-input-qty {
    width: 65px;
    padding: 6px;
    text-align: center;
    height: 34px;
}

.product-select-unit {
    width: 75px;
    padding: 6px;
    font-size: 12px;
    height: 34px;
}

.btn-mini {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    color: var(--white);
    border: none;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-mini-danger { 
    background-color: #dc3545;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
}

.btn-mini-success { 
    background-color: #28a745;
    flex: 1;
    gap: 4px;
}

.btn-mini-warn {
    background-color: #e67e22;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Contact Page design */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-info-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(211, 47, 47, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-info-details h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.contact-info-details p {
    color: var(--text-muted);
    font-size: 14px;
}

.map-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 300px;
    border: 1px solid var(--border);
    margin-top: 20px;
}

/* Error page design */
.error-layout {
    text-align: center;
    padding: 60px 20px;
}

.error-code {
    font-size: 100px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.error-message {
    font-size: 22px;
    color: var(--text-muted);
    margin: 15px 0 30px 0;
}

/* Responsive Navigation adjustments */
@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-bottom: 2px solid var(--primary);
        gap: 15px;
        display: none;
    }
    
    .nav-menu.open {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
    }
}

/* Comprehensive Mobile Responsive Styles */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 15px 10px;
    }
    
    .card-wrapper, .info-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .panel-card {
        padding: 20px;
    }
    
    /* Hero Section Responsive */
    .hero-section {
        padding: 40px 20px;
        margin-bottom: 25px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px 15px;
        border-radius: 20px;
        width: 100%;
    }
    
    .hero-stat-num {
        font-size: 18px;
    }
    
    .hero-stat-lbl {
        font-size: 9px;
    }
    
    /* Grids & Forms */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .form-grid-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group-item {
        width: 100%;
        flex: 1 1 auto;
    }
    
    .btn-styled {
        width: 100%;
        padding: 12px;
    }
    
    .form-grid-flex div button {
        width: 100%;
        margin-top: 5px;
    }
    
    /* Söküm Summary Cards */
    .summary-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .summary-metric-card {
        padding: 15px 10px;
    }
    
    .summary-metric-card h3 {
        font-size: 20px;
    }
    
    /* Driver quantity grid */
    .driver-qty-input-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .driver-item {
        flex: auto;
        padding: 6px;
    }
    
    .driver-item input {
        width: 100%;
        max-width: 80px;
    }
    
    /* Table Compact Styling */
    th, td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    /* Swipe indicator styling */
    .table-responsive {
        position: relative;
    }
    
    .table-responsive::after {
        content: '';
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 15px;
        background: linear-gradient(to right, transparent, rgba(0,0,0,0.05));
        pointer-events: none;
    }
}

@media (max-width: 480px) {
    /* Navbar compact header */
    .navbar-container {
        padding: 5px 10px;
    }
    
    .logo-svg {
        width: 38px;
        height: 38px;
    }
    
    .brand-main {
        font-size: 20px;
    }
    
    .brand-sub {
        font-size: 9px;
        letter-spacing: 1px;
    }
    
    /* Hero stats stack on very small screens */
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        border-radius: 12px;
    }
    
    .hero-stat-item {
        padding: 4px 0;
    }
    
    .hero-stat-item:nth-child(2) {
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid rgba(255,255,255,0.15);
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 8px 0;
    }
    
    /* Metric cards stack */
    .summary-cards-container {
        grid-template-columns: 1fr;
    }
    
    /* Product list layout stack */
    .order-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .product-item-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        gap: 8px;
    }
    
    .product-label {
        font-size: 12px;
        margin: 0;
        text-align: left;
    }
    
    .product-input-qty {
        width: 50px;
        height: 30px;
        font-size: 12px;
    }
    
    .product-select-unit {
        width: 68px;
        height: 30px;
        font-size: 11px;
    }
    
    .driver-qty-input-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .card-wrapper {
        padding: 15px;
    }
    
    .btn-clear-order {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 4px;
    }
}

.btn-clear-order {
    background-color: #e67e22;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-clear-order:hover {
    background-color: var(--secondary-dark);
}

/* Printing Utilities */
@media print {
    body {
        background-color: white;
        color: black;
        font-size: 12px;
    }
    
    .navbar-wrapper, .footer-wrapper, .form-grid-flex, .driver-qty-input-group, .order-setup-panel, .no-print, .btn-styled, .btn-mini, button {
        display: none !important;
    }
    
    .content-wrapper {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
    
    .card-wrapper {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 6px;
    }
}
