@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary: #005a8d; /* BPS Blue */
    --primary-hover: #00426b;
    --secondary: #f39c12; /* Accent color */
    --bg-light: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border: #e0e0e0;
    --danger: #d9534f;
    --header-bg: #005a8d;
    --header-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

/* Header / Navbar style for professional look */
.top-nav {
    width: 100%;
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.top-nav h1 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

.main-content {
    margin-top: 5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 450px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary);
}

.container.wide {
    max-width: 1100px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary);
}

.dashboard-header {
    text-align: left;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.dashboard-header h2 {
    text-align: left;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 1.75rem;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.action-buttons {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    text-align: center;
}

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

.btn-secondary {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: #f0f8ff;
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #c9302c;
}

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

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

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 90, 141, 0.2);
}

.error-msg {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.link-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

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

th:last-child, td:last-child {
    border-right: none;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    vertical-align: middle;
}

th[colspan] {
    text-align: center;
}

td {
    font-size: 0.9rem;
}

tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

tbody tr:hover {
    background-color: #f0f8ff;
}

.db-section {
    margin-bottom: 3rem;
}

.db-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-left: 4px solid var(--secondary);
    padding-left: 0.5rem;
}
