/* style.css */
/* Modern Design System for Stock Management */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.5);
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Better for long pages */
    padding-top: 5vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.6s ease-out;
}

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

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text; /* Fixed compatibility lint warning */
    -webkit-text-fill-color: transparent;
}

h1.logo {
    font-size: 3rem;
    letter-spacing: 2px;
}

/* Dashboard Styles */
.dashboard-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.nav-card {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.3);
}

.nav-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.nav-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.nav-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Navigation Header */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.back-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.btn-white:hover {
    background: var(--text-white);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-white i {
    font-size: 1.1rem;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

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

#searchInput {
    padding-left: 3rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 1rem;
}

button {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

button:active {
    transform: translateY(0);
}

.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

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

.notification.success { border-left: 4px solid var(--success); }
.notification.error { border-left: 4px solid var(--error); }

/* List Section Styles */
.list-section {
    margin-top: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.list-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.item-card:hover {
    transform: translateX(4px);
    border-color: var(--primary);
}

.item-card.status-ok {
    background: rgba(6, 78, 59, 0.4);
    border-left: 6px solid #10b981;
}

.item-card.status-empty {
    background: rgba(127, 29, 29, 0.6);
    border: 2px solid #fbbf24;
    border-left: 6px solid #ef4444;
}

.item-info {
    flex-grow: 1;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.item-stk-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-stk {
    background: var(--input-bg);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.btn-stk {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 6px;
}

.btn-stk i {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-plus {
    background: #065f46; /* Dark Green */
    color: #ffffff; /* White icon */
}

.btn-plus:hover {
    background: #044e39;
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.4);
}

.btn-minus {
    background: #991b1b; /* Dark Red */
    color: #fbbf24; /* Yellow icon */
}

.btn-minus:hover {
    background: #7f1d1d;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.btn-edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.btn-edit:hover {
    background: var(--primary);
    color: white;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-delete:hover {
    background: var(--error);
    color: white;
}

.loading, .no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}
