/* Mueblería Señor Recámara Custom Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 500px;
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
}

.stat-card .card-body {
    padding: 2rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Navigation - Professional Header (Clean White Theme) */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937 !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
    color: #000000 !important;
}

.navbar-brand i {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 0.5rem;
    border-radius: 10px;
}

.navbar-nav {
    gap: 0.25rem;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #4b5563 !important;
}

.navbar-nav .nav-link:hover {
    background: #f3f4f6;
    color: #1f2937 !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: #f3f4f6;
    color: #374151 !important;
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #6b7280;
    border-radius: 2px;
}

/* User Dropdown - Clean White Style */
#userDropdown {
    background: #f9fafb;
    border-radius: 25px;
    padding: 0.5rem 1rem !important;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    color: #374151 !important;
}

#userDropdown:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1f2937 !important;
}

#userDropdown i {
    font-size: 1.2rem;
    color: #6b7280;
}

.dropdown-menu {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 0.5rem;
    min-width: 200px;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #374151;
    transform: translateX(4px);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e5e7eb;
}

/* Navbar Toggler - Light Theme */
.navbar-toggler {
    border: 2px solid #d1d5db;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

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

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

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

.btn-lg {
    padding: 0.75rem 2rem;
}

/* Quick Action Buttons - Professional Style */
.quick-action-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 1.5rem 1rem !important;
    min-height: 130px !important;
    border-radius: 16px !important;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-btn:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    color: #fff !important;
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.quick-action-btn .icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.25);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.quick-action-btn:hover .icon-wrapper {
    background: rgba(255,255,255,0.4);
    transform: scale(1.15) rotate(-5deg);
}

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

.quick-action-btn .btn-label {
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* Color variants with strong gradients */
.quick-action-pos {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

.quick-action-products {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.quick-action-inventory {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
}

.quick-action-sales {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

.quick-action-layaways {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important;
}

.quick-action-customers {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
}

.quick-action-users {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.quick-action-reports {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.input-group-text {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem 0 0 0.5rem;
    background-color: #f8f9fa;
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Inventory Grid */
.product-card {
    border: none;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 2rem 4rem rgba(0,0,0,.1);
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem 1rem 0 0;
}

.product-image i {
    font-size: 4rem;
    color: #6c757d;
}

.price-retail {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

.price-wholesale {
    font-size: 1.1rem;
    color: var(--warning-color);
}

.stock-info {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-high {
    background-color: #d4edda;
    color: #155724;
}

.stock-medium {
    background-color: #fff3cd;
    color: #856404;
}

.stock-low {
    background-color: #f8d7da;
    color: #721c24;
}

/* Dashboard */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

.dashboard-card.info {
    border-left-color: var(--info-color);
}

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

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

/* ============================================
   RESPONSIVE STYLES - MOBILE FIRST APPROACH
   ============================================ */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Navigation - Professional Header Mobile */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-brand i {
        font-size: 1.1rem;
        padding: 0.35rem;
        border-radius: 8px;
    }
    
    .navbar-nav {
        gap: 0.15rem;
        padding-top: 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.9rem;
    }
    
    .navbar-nav .nav-link.active::after {
        display: none;
    }
    
    #userDropdown {
        margin-top: 0.5rem;
        border-radius: 10px;
        padding: 0.6rem 0.75rem !important;
    }
    
    .dropdown-menu {
        border-radius: 10px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 300px;
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Typography */
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    .display-4 {
        font-size: 1.5rem !important;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Quick Action Buttons */
    .quick-action-btn {
        min-height: 100px !important;
        padding: 1rem 0.5rem !important;
    }
    
    .quick-action-btn .icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .quick-action-btn i {
        font-size: 1.25rem;
    }
    
    .quick-action-btn .btn-label {
        font-size: 0.8rem !important;
    }
    
    /* Dashboard Cards */
    .stat-card .card-body {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    /* Tables - Convert to cards on mobile */
    .table-responsive {
        border: none;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .table tbody td {
        padding: 0.5rem;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-header h5, .card-header h6 {
        font-size: 0.95rem;
    }
    
    /* Product Cards */
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-image i {
        font-size: 3rem;
    }
    
    .price-retail {
        font-size: 1.2rem;
    }
    
    .price-wholesale {
        font-size: 1rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    footer {
        text-align: center;
    }
    
    footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
    
    /* Container spacing */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Page Headers */
    .bg-primary.py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .bg-primary h1 {
        font-size: 1.25rem !important;
    }
    
    .bg-primary p {
        font-size: 0.85rem !important;
    }
    
    /* POS System Mobile */
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 10px;
    }
    
    .pos-cart {
        order: -1;
        height: auto;
        max-height: 300px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 10px;
    }
    
    .product-card {
        padding: 8px;
    }
    
    .product-card img {
        width: 40px;
        height: 40px;
    }
    
    .product-card .name {
        font-size: 10px;
    }
    
    .product-card .price {
        font-size: 12px;
    }
    
    /* Cart items */
    .cart-item {
        padding: 8px;
        gap: 8px;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.75rem;
        padding: 0.25em 0.5em;
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        font-size: 0.9rem;
    }
    
    /* Pagination */
    .pagination {
        font-size: 0.85rem;
    }
    
    .page-link {
        padding: 0.375rem 0.5rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 350px;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .quick-action-btn {
        min-height: 110px !important;
        padding: 1.25rem 0.75rem !important;
    }
    
    .quick-action-btn .icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .quick-action-btn i {
        font-size: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    /* POS adjustments */
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .pos-cart {
        order: -1;
        height: auto;
        max-height: 350px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 400px;
    }
    
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .quick-action-btn {
        min-height: 120px !important;
    }
    
    /* POS adjustments for tablets */
    .pos-container {
        grid-template-columns: 1fr 350px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .pos-container {
        grid-template-columns: 1fr 400px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .form-select {
        min-height: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .dropdown-item {
        padding: 0.75rem 1.25rem;
    }
    
    .quick-action-btn {
        min-height: 100px !important;
    }
    
    /* Larger touch targets for mobile */
    .table tbody tr {
        min-height: 48px;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 991.98px) and (orientation: landscape) {
    .hero-section {
        min-height: 250px;
    }
    
    .pos-cart {
        max-height: 250px;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .alert {
        display: none !important;
    }
    
    .container-fluid {
        padding: 0;
    }
    
    .card {
        border: 1px solid #dee2e6;
        box-shadow: none;
    }
    
    /* Ensure tables print well */
    .table {
        font-size: 10pt;
    }
    
    .table-responsive {
        overflow: visible;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}