/* Modern Minimalist Store Manager Styles */

/* CSS Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #fafafa;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    min-height: 100vh;
    position: relative;
}

/* Authentication Section */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.full-width {
    grid-column: 1 / -1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-ghost:hover {
    background: var(--border-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-buttons .btn {
    flex: 1;
}

/* Dashboard Section */
.dashboard-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--border-light);
    border-radius: var(--radius);
}

.main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.tab {
    padding: 1rem 2rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--border-light);
}

.tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--border-light);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* File Upload */
.file-upload .file-input-wrapper {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--border-light);
}

.file-upload .file-input-wrapper:hover {
    border-color: var(--primary);
    background: rgb(37 99 235 / 0.05);
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    padding: 0;
    border: none;
}

.file-input-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Data Table */
.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.data-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--surface);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--border-light);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-primary);
}

tr:hover {
    background: var(--border-light);
}

tr:last-child td {
    border-bottom: none;
}

.no-data {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border);
    display: block;
}

.no-data p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-on {
    background: rgb(16 185 129 / 0.1);
    color: var(--success);
}

.status-off {
    background: rgb(239 68 68 / 0.1);
    color: var(--danger);
}

.status-pending {
    background: rgb(245 158 11 / 0.1);
    color: var(--warning);
}

/* Messages */
.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    border-left: 4px solid;
}

.message.success {
    background: rgb(16 185 129 / 0.1);
    color: var(--success);
    border-left-color: var(--success);
}

.message.error {
    background: rgb(239 68 68 / 0.1);
    color: var(--danger);
    border-left-color: var(--danger);
}

.message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

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

/* Action Buttons */
.action-btn {
    padding: 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
    border-radius: var(--radius-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main {
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .tab {
        padding: 0.75rem 1.5rem;
        white-space: nowrap;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    .data-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .form-actions .btn {
        padding: 0.75rem 1rem;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Focus styles for accessibility */
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hover effects for better UX */
.card:hover {
    box-shadow: var(--shadow-md);
}

.input-group input:hover,
.input-group select:hover,
.input-group textarea:hover {
    border-color: var(--text-secondary);
}

