/* 
 * Mobile Device Identification System
 * Modern, Clean Stylesheet
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #059669;
    --danger: #dc2626;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    margin-bottom: 24px;
}

h2 {
    margin: 0 0 8px 0;
    color: var(--gray-900);
    font-size: 28px;
    font-weight: 700;
}

.subtitle {
    color: var(--gray-500);
    margin: 0;
    font-size: 15px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
    color: #166534;
}

.alert.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn.secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn.secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn.light {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn.light:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-100);
}

.btn-icon.delete:hover {
    background: #fee2e2;
}

/* Actions Bar */
.actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Table */
.table-wrapper {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

th {
    text-align: left;
    padding: 16px;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

tbody tr:hover {
    background: var(--gray-50);
}

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

.brand-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.price {
    font-weight: 600;
    color: var(--secondary);
}

.date {
    color: var(--gray-500);
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 50px 30px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.drop-zone.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: scale(1.01);
}

.drop-zone input {
    display: none;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.drop-zone p {
    margin: 0;
    color: var(--gray-600);
    font-size: 15px;
    line-height: 1.8;
}

.drop-zone p strong {
    color: var(--gray-800);
    font-size: 16px;
}

.or-divider {
    display: inline-block;
    padding: 8px 0;
    color: var(--gray-400);
    font-size: 13px;
}

.paste-hint {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 6px;
    color: var(--primary);
    font-size: 13px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Tips Card */
.tips-card {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
}

.tips-card h4 {
    margin: 0 0 12px 0;
    color: #92400e;
    font-size: 14px;
}

.tips-card ul {
    margin: 0;
    padding-left: 20px;
    color: #78350f;
    font-size: 13px;
}

.tips-card li {
    margin-bottom: 6px;
}

/* Cards */
.card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
}

.card pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 13px;
    color: var(--gray-700);
    background: var(--gray-50);
    padding: 12px;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 12px;
    }
    
    .drop-zone {
        padding: 30px 20px;
    }
    
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-card {
        padding: 16px 12px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .actions, .btn, .tips-card {
        display: none;
    }
    
    .table-wrapper {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
