/* style.css - Design System & Modern UI Stylesheet for Chuck's Parts Portal */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #0d0f14;
    --bg-card: rgba(22, 25, 32, 0.7);
    --bg-input: rgba(30, 35, 45, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 210, 255, 0.5);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-blue: #00d2ff;
    --accent-indigo: #0066ff;
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
    --accent-glow: 0 0 20px rgba(0, 210, 255, 0.35);
    
    --success: #10b981;
    --success-glow: 0 0 15px rgba(16, 185, 129, 0.3);
    --error: #ef4444;
    --error-glow: 0 0 15px rgba(239, 68, 68, 0.3);
    
    --shadow-main: 0 12px 40px rgba(0, 0, 0, 0.5);
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 10%, rgba(0, 102, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(0, 210, 255, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-inter);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
}

/* Glassmorphism Containers */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-main);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-outfit);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header & Nav */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    background: rgba(13, 15, 20, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-img {
    height: 48px;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-outfit);
    font-size: 1.5rem;
    font-weight: 800;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.5);
    opacity: 0.95;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--error);
    color: #fff;
    box-shadow: var(--error-glow);
    transform: translateY(-2px);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-family: var(--font-inter);
    font-size: 1rem;
    outline: none;
    transition: all 0.25s ease;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: var(--accent-glow);
    background: rgba(30, 35, 45, 0.9);
}

/* Search Box Container */
.search-wrapper {
    max-width: 650px;
    margin: 2rem auto;
    text-align: center;
}

.search-form {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
}

.search-form .form-control {
    flex-grow: 1;
    font-size: 1.1rem;
}

/* Table Design */
.table-responsive {
    overflow-x: auto;
    margin-top: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table-custom th, .table-custom td {
    padding: 1rem 1.25rem;
}

.table-custom th {
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-outfit);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.table-custom tr {
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    transition: background 0.25s ease;
}

.table-custom tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-custom tr:last-child {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-in-stock {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-out-of-stock {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Login Page Specific Layout */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    max-width: 460px;
    width: 100%;
    text-align: center;
}

.login-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.login-logos img {
    height: 54px;
    object-fit: contain;
}

.login-logos .divider {
    height: 36px;
    width: 1px;
    background: var(--border-color);
}

/* Error/Success Alert Banners */
.alert {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-info {
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: #93c5fd;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: rgba(13, 15, 20, 0.5);
    margin-top: auto;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--accent-blue);
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}
