:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--surface);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
}

/* BUTTONS */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-open { background-color: var(--border); color: var(--text); }
.btn-download { background-color: var(--success); color: white; }
.btn-primary { background-color: var(--primary); color: white; width: 100%; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-edit { background-color: #f59e0b; color: white; padding: 0.25rem 0.5rem; font-size: 0.8rem; margin-right: 4px;}
.btn-delete { background-color: var(--danger); color: white; padding: 0.25rem 0.5rem; font-size: 0.8rem; }

/* CONTAINER & TABS */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tab-menu {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* LAYOUT GRID FOR CRUD */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .grid-layout { grid-template-columns: 350px 1fr; }
}

/* CARDS & FORMS */
.card-form {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: fit-content;
}

.card-form h3 { margin-bottom: 1rem; font-size: 1.1rem; }

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

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}

/* TABLES & SEARCH */
.table-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-input {
    width: 100%;
    max-width: 300px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}

.table-wrapper {
    overflow-x: auto;
}

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

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

th { background-color: #f8fafc; color: var(--text-light); }

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 1rem;
}

.page-link {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    border-radius: 4px;
}

.page-link.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.placeholder-text {
    padding: 2rem;
    background: var(--surface);
    border-radius: 8px;
    color: var(--text-light);
    text-align: center;
}
