:root {
    --primary: #6366f1;
    /* Indigo */
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    /* Pink */
    --accent: #06b6d4;
    /* Cyan */
    --warning: #f59e0b;
    /* Amber */
    --danger: #ef4444;
    /* Red */
    --success: #10b981;
    /* Emerald */
    --bg-light: #f8fafc;
    /* Ultra light grey */
    --bg-white: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    width: 100%;
}

/* Premium Card Design */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary);
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Camera Preview */
#camera-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 6px solid #fff;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

#video {
    width: 100%;
    display: block;
    transform: scaleX(-1);
    background: #000;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

select {
    cursor: pointer;
    padding-right: 2.5rem;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Buttons */
button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Modal UI */
#status-modal {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    display: none;
    font-weight: 700;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-success {
    background: var(--success);
    color: white;
    border-left: 6px solid rgba(0, 0, 0, 0.1);
}

.status-error {
    background: var(--danger);
    color: white;
    border-left: 6px solid rgba(0, 0, 0, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 1rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f1f5f9;
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Stats Badges */
.stat-card h3 {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Pagination Styles - Button Group Style (Match Image) */
.pagination-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1rem;
}

.pagination-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-white);
}

.pagination-btn {
    background: transparent;
    color: var(--accent);
    border: none;
    border-right: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    font-size: 0.85rem;
    height: 38px;
    display: flex;
    align-items: center;
}

.pagination-btn:last-child {
    border-right: none;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-light);
}

.pagination-btn:disabled {
    color: var(--text-muted);
    opacity: 0.6;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #f1f5f9 !important;
    color: var(--text-muted);
    font-weight: 700;
}

.pagination-ellipsis {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    background: var(--bg-white);
}