/* Modern UI System (Glass & Clean) */
:root {
    --bg-app: #f4f7f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
}

/* Card System */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 2rem;
}
.card:hover { /* Subtle lift effect */
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: none; /* Resetting upper from legacy if needed */
    letter-spacing: -0.025em;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}
p {
    color: var(--text-secondary);
    line-height: 1.6;
}

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

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: normal; /* Reset legacy */
    text-transform: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    background-color: white;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: var(--text-primary);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: 1px solid transparent;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Tables - Modern & Clean */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

thead th {
    background-color: #f9fafb;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid #e5e7eb;
    letter-spacing: 0.05em;
    text-align: left;
}

tbody tr {
    transition: background-color 0.15s;
}
tbody tr:hover {
    background-color: #f9fafb;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Status Pills */
.status-pill, .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px; /* Round */
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: normal;
    background-color: #f3f4f6; /* default */
    color: #4b5563;
    border: none;
}

.status-completed, .status-paid, .status-active, .status-verified {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending, .status-unpaid, .status-draft {
    background-color: #fef3c7;
    color: #92400e;
}

.status-cancelled, .status-rejected {
    background-color: #fee2e2;
    color: #b91c1c;
}

.status-production, .status-processing {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Images */
.img-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    object-fit: cover;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/* Dashboard Grid/Flex Utils */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-box {
    position: relative;
    max-width: 300px;
    flex-grow: 1;
}
.search-box input {
    padding-left: 2.5rem;
}
.search-box span { /* icon placeholder */
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}
