:root {
    /* Color Palette - Dark Premium */
    --bg-body: #0b1120;
    /* Deep Navy */
    --bg-card: #1e293b;
    /* Slate 800 */
    --bg-card-hover: #334155;
    /* Slate 700 */

    --primary: #38bdf8;
    /* Sky 400 - Vivid Accent */
    --primary-hover: #0ea5e9;
    /* Sky 500 */

    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --border: #334155;
    /* Slate 700 */
    --border-light: #475569;
    /* Slate 600 */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Header & Nav */
header {
    background-color: rgba(15, 23, 42, 0.9);
    /* Slate 900 with opacity */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: 80vh;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Utility Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #0f172a;
    /* Dark text on bright button for contrast */
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea,
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #334155;
    /* Slate 700 - Lighter than card for contrast */
    border: 1px solid #475569;
    /* Slate 600 - Visible border */
    border-radius: var(--radius-md);
    color: #ffffff;
    /* Pure white text */
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
    /* Slate 400 */
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #1e293b;
    /* Darker on focus */
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    color: white;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    /* Reduced from 0.5rem to stick closer to input */
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Cards & Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #0f172a;
    border-bottom: 1px solid var(--border);
}

.product-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: auto;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

/* Cart & Checkout Specifics */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.cart-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.cart-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
}

/* Checkout Steps */
.step-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.step-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-number {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Tables - Admin & General */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    /* Increased padding */
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background-color: rgba(15, 23, 42, 0.5);
    /* Slight tint for header */
}

td {
    padding: 1rem 1.5rem;
    /* Increased padding */
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(56, 189, 248, 0.05);
    /* Very subtle hover tint */
}

/* Sidebar Utilities */
.sidebar-link {
    font-size: 0.8rem;
    /* Reduced font size */
}

.sidebar-header {
    font-size: 0.7rem;
}

.sidebar-id-card {
    padding: 0.5rem !important;
    /* Compact ID card */
}