:root {
    --primary: #013244;
    --primary-rgb: 1, 51, 69;
    --primary-hover: #E8F1FF;
    --primary-hover-rgb: 232, 241, 255;
    --secondary: #3b82f6;
    --secondary-rgb: 59, 130, 246;
    --danger: #8a1e1e;
    --danger-rgb: 138, 30, 30;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --bg-main: #ffffff;
    --bg-card: #f8fafc;
    --border-main: #e2e8f0;

    --text-main: #0f172a;
    --text-soft: #212529;
    --text-muted: #64748b;

    --border-radius: 8px;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: var(--bg-main);
    border: 1px solid var(--border-main);
    border-radius: var(--border-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:hover, select:hover, textarea:hover {
    border-color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

input:disabled {
    background-color: var(--bg-main);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    height: 2.25rem;
    line-height: 1;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    user-select: none;
    position: relative;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-primary,
.btn-group-primary .btn.active
{
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled),
.btn-group-primary .btn:not(.active):hover:not(:disabled)
{
    background-color: var(--secondary);
}

.btn-secondary,
.btn-group-primary .btn:not(.active)
{
    background-color: var(--bg-card);
    border-color: var(--border-main);
    color: var(--text-main);
}

.btn-secondary:hover:not(:disabled),
.btn-group-primary .btn:not(.active):hover:not(:disabled)
{
    background-color: var(--border-main);
}

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

.btn-danger:hover:not(:disabled) {
    background-color: var(--error);
}

.badge {
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-main);
    border-radius: var(--border-radius);
}

.badge-primary {
    background-color: rgba(var(--primary-rgb), 0.5);
    color: #ffffff;
}

.btn .badge {
    position: absolute;
    top: 0;
    left: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    height: 1.5rem;
    min-width: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px;
    z-index: 100;
}

.btn .badge.badge-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: auto;
    border: 1px solid var(--border-main);
}

.table thead tr {
    background-color: var(--bg-card);
}

.table thead tr:first-of-type th:first-of-type {
    border-top-left-radius: var(--border-radius);
}

.table thead tr:first-of-type th:last-of-type {
    border-top-right-radius: var(--border-radius);
}

.table thead tr:last-of-type th {
    border-bottom: 1px solid var(--border-main);
}

.table tbody tr:last-of-type td:first-of-type {
    border-bottom-left-radius: var(--border-radius);
}

.table tbody tr:last-of-type td:last-of-type {
    border-bottom-right-radius: var(--border-radius);
}

.table th {
    color: var(--primary);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
}

.table td {
    padding: 1rem;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.table tbody tr:last-of-type td:first-child {
    border-bottom-left-radius: var(--border-radius);
}

.table tbody tr:last-of-type td:last-child {
    border-bottom-right-radius: var(--border-radius);
}

.table tbody tr:hover {
    background-color: var(--primary-hover);
    transform: scale(1.005);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

h1 {
    margin: 0px 0px 0.5rem 0px;
    color: var(--primary);
}

.btn-group {
    display: flex;
}

.btn-group .btn {
    border-radius: 0px;
}

.btn-group .btn:first-of-type {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.btn-group .btn:last-of-type {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.flex-row {
    display: flex;
    width: 100%;
}

.flex-column {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.flex-column-auto {
    flex: 0 0 auto;
    width: auto;
}

.flex-col-1 {
    flex: 0 0 auto;
    width: 8.33333333%
}

.flex-col-2 {
    flex: 0 0 auto;
    width: 16.66666667%
}

.flex-col-3 {
    flex: 0 0 auto;
    width: 25%
}

.flex-col-4 {
    flex: 0 0 auto;
    width: 33.33333333%
}

.flex-col-5 {
    flex: 0 0 auto;
    width: 41.66666667%
}

.flex-col-6 {
    flex: 0 0 auto;
    width: 50%
}

.flex-col-7 {
    flex: 0 0 auto;
    width: 58.33333333%
}

.flex-col-8 {
    flex: 0 0 auto;
    width: 66.66666667%
}

.flex-col-9 {
    flex: 0 0 auto;
    width: 75%
}

.flex-col-10 {
    flex: 0 0 auto;
    width: 83.33333333%
}

.flex-col-11 {
    flex: 0 0 auto;
    width: 91.66666667%
}

.flex-col-12 {
    flex: 0 0 auto;
    width: 100%
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.items-start {
    align-items: start;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: end;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.justify-end {
    justify-content: end;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-100 {
    width: 100%;
}

.loading-spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
}

.text-muted {
    color: var(--text-muted);
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}