:root {
    --md-primary: #3f51b5;
    --md-primary-dark: #303f9f;
    --md-secondary: #ffb300;
    --md-surface: #ffffff;
    --md-background: #f3f4f6;
    --md-text: #1f2933;
    --md-muted: #64748b;
    --md-danger: #e53935;
    --md-success: #43a047;
}

body {
    background: var(--md-background);
    color: var(--md-text);
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.navbar {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.navbar-brand,
.navbar-brand:hover {
    color: var(--md-primary);
}

.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.65rem 1.5rem;
}

.navbar .nav-link.active {
    color: var(--md-primary);
    font-weight: 600;
    position: relative;
}

.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--md-primary);
}

.md-card,
.card {
    border: none;
    border-radius: 18px;
    background: var(--md-surface);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.md-card-header,
.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.25rem 1.5rem;
}

.md-card-body,
.card-body {
    padding: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--md-muted);
    letter-spacing: 0.02em;
}

.form-control,
.form-control:focus {
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: rgba(63, 81, 181, 0.75);
    box-shadow: 0 0 0 4px rgba(63, 81, 181, 0.12);
}

.btn {
    border-radius: 0;
    border: none;
    padding: 0.6rem 1.6rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-md {
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    line-height: 1.2;
}

.btn:focus,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.btn-primary {
    background: var(--md-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--md-primary-dark);
}

.btn-success {
    background: var(--md-success);
    color: #fff;
}

.btn-warning {
    background: #fb8c00;
    color: #fff;
}

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

.badge {
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-weight: 500;
}

.table {
    margin-bottom: 0;
    width: 100%;
    table-layout: fixed;
}

.table thead {
    background: rgba(63, 81, 181, 0.06);
}

.table thead th {
    border: none;
    color: var(--md-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(63, 81, 181, 0.04);
}

.table td, .table th {
    overflow-wrap: anywhere;
    word-break: break-word;
}

input[type="checkbox"] {
    accent-color: var(--md-primary);
}

.text-break {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

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

.alert {
    border-radius: 14px;
    border: none;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 1rem 1.25rem;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1055;
}
.loading-overlay.active {
    display: flex;
}
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(63,81,181,.2);
    border-top-color: var(--md-primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.25rem;
}

.login-card {
    width: 100%;
    max-width: 320px;
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    margin: 0 auto;
}

.login-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(63, 81, 181, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.login-avatar img {
    width: 50%;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 576px) {
    .login-wrapper {
        padding: 2.5rem 1rem;
    }

    .login-card {
        max-width: 280px;
        padding: 1.5rem 1.25rem;
    }
}

.login-card .logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(63, 81, 181, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--md-primary);
}

.material-table {
    border-radius: 18px;
    overflow: hidden;
}

.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    color: var(--md-primary);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--md-muted);
    margin-bottom: 0;
}

.divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.3);
    margin: 1.25rem 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-icon .material-symbols-outlined {
    font-size: 1.2rem;
}

.floating-action {
    position: fixed;
    bottom: 24px;
    right: 24px;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.2);
}

