/* Store Interface - Main Styles */
:root {
    --primary-color: #3a0ca3;
    --secondary-color: #4361ee;
    --accent-color: #4cc9f0;
    --success-color: #2ecc71;
    --warning-color: #f8961e;
    --danger-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #1a1a2e;
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}
/* Sidebar Styles */
.store-sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.store-logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
}

.store-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.store-info {
    background: rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.store-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.store-email {
    font-size: 0.9rem;
    color: #718096;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-speed);
    font-weight: 500;
}

.nav-links a i {
    font-size: 1.2rem;
    width: 24px;
}

.nav-links a:hover {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.3);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: #f72585;
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-speed);
    font-weight: 500;
    margin-top: 1rem;
    background: rgba(247, 37, 133, 0.1);
}

.logout-btn:hover {
    background: rgba(247, 37, 133, 0.2);
    transform: translateX(5px);
}

/* Main Content */
.store-main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    background: #f5f7fb;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.welcome-message h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.welcome-message p {
    color: #718096;
    font-size: 0.95rem;
}

.quick-actions {
    display: flex;
    gap: 1rem;
}

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

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.warranty {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
}

.stat-icon.product {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
}

.stat-icon.customer {
    background: linear-gradient(135deg, #f72585, #b5179e);
}

.stat-icon.expiring {
    background: linear-gradient(135deg, #f8961e, #f3722c);
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.stat-info p {
    color: #718096;
    font-size: 0.9rem;
}

/* Recent Warranties */
.recent-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.table-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

.table-container {
    overflow-x: auto;
}

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

.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #4a5568;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.expired {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.expiring {
    background: #fef3c7;
    color: #92400e;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b5179e);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Form Container */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;

/* Modal (site-wide consistent styling) */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8,16,35,0.5);
    z-index: 9999;
    padding: 2rem;
}

.modal.active { display: flex; }

.modal-content {
    width: 100%;
    max-width: 980px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(8,16,35,0.25);
    overflow: hidden;
}

.modal-body { padding: 1.5rem; }

.modal-header h3 { margin: 0; font-size: 1.35rem; color: var(--dark-color); }

.modal-grid { display: grid; grid-template-columns: 380px 1fr; gap: 1.25rem; align-items: start; }

.modal-gallery { display:flex; gap:12px; flex-wrap:wrap; align-content:flex-start; }
.modal-gallery a { display:inline-block; }
.pd-thumb { width: 100%; max-width: 340px; height: auto; border-radius: 10px; display:block; object-fit:cover; box-shadow: 0 8px 30px rgba(13,38,72,0.08); }

.modal-info { padding: 0.5rem 0; }
.modal-info .muted { color:#586376; margin-bottom:0.75rem; }

.modal-table th { text-align:left; padding:8px 10px; width: 35%; color:#4a5568; font-weight:600; }
.modal-table td { padding:8px 10px; color:#2d3748; }

.close-modal { position:absolute; right:1rem; top:1rem; background:transparent; border:none; font-size:1.6rem; color:#475569; cursor:pointer; }

@media (max-width: 880px) {
    .modal-grid { grid-template-columns: 1fr; }
    .pd-thumb { max-width: 100%; }
}
    border-bottom: 2px solid #f1f5f9;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #718096;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.2rem;
}

/* Warranty Details */
.warranty-details {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.details-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.details-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.warranty-id {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.details-body {
    padding: 2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.detail-label {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-color);
}

/* Invoice Preview */
.invoice-preview {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px dashed #cbd5e1;
    margin: 2rem 0;
}

.invoice-preview i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.invoice-preview h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.invoice-preview p {
    color: #718096;
    margin-bottom: 1rem;
}

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

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0aec0;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close-modal:hover {
    color: var(--danger-color);
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(150%);
    transition: transform 0.3s ease-out;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .store-main-content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    /* Hide sidebar by default on mobile */
    .store-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .store-sidebar.active {
        left: 0;
    }
    
    .store-main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 700px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .store-sidebar {
        width: 300px;
    }
    
    .store-main-content {
        padding: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .data-table {
        min-width: 600px;
        font-size: 0.85rem;
    }
}