/* --- Global & Base Styles --- */
:root {
    --md-sys-color-primary: #3f51b5;
    --md-sys-color-surface-container-highest: #ffffff;
    --md-sys-color-surface: #f8f9fa;
    --md-sys-color-on-surface: #202124;
    --md-sys-color-on-surface-variant: #5f6368;
    --md-sys-color-outline: #caced9;
    --md-sys-color-outline-variant: #dee2e6;
    --md-sys-color-tertiary: #6750a4;
    --md-sys-color-review-action: #6750a4;
    --md-sys-color-on-review-action: #ffffff;
    --md-sys-color-error: #b3261e;
    --md-sys-color-on-error: #ffffff;
    --log-color-success: #1e8e3e;
    --log-color-error: #d93025;
    --log-color-warning: #f9ab00;
    --log-color-info: #5f6368;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 24px;
    transition:
        box-shadow 0.2s ease-in-out,
        background-color 0.2s ease-in-out;
}

.btn-filled {
    height: 48px;
    padding: 0 24px;
    background-color: var(--md-sys-color-primary);
    color: #ffffff;
    font-size: 0.95rem;
    letter-spacing: 0.01rem;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-filled:hover {
    background-color: #36469e;
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    color: var(--md-sys-color-on-surface-variant);
    background-color: transparent;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.btn-icon .material-symbols-outlined {
    font-size: 24px;
}

.btn-text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    height: 40px;
    padding: 0 16px;
    border-radius: 20px;
}

.btn-text:hover {
    background-color: rgba(63, 81, 181, 0.08);
}

.btn-small {
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    font-size: 0.85rem;
}

/* Button Color Variants */
.submit-review-btn {
    background-color: var(--md-sys-color-review-action);
    color: var(--md-sys-color-on-review-action);
}

.submit-review-btn:hover {
    background-color: #5a458c;
}

.deny-btn,
.revoke-btn {
    background-color: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
}

.deny-btn:hover,
.revoke-btn:hover {
    background-color: #a02119;
}

.approve-btn {
    background-color: var(--log-color-success);
    color: #ffffff;
}

.approve-btn:hover {
    background-color: #187532;
}

.view-request-btn {
    background-color: var(--md-sys-color-tertiary);
    color: #ffffff;
}

.view-request-btn:hover {
    background-color: #5a458c;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    background-color: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.back-button:hover {
    background-color: rgba(63, 81, 181, 0.08);
}

.back-button .material-symbols-outlined {
    font-size: 20px;
}

/* --- Forms --- */
.form-section-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-grid.single-col {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

.form-group select,
.form-group input {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 12px 16px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 8px;
    background-color: white;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    width: 100%;
}

.form-actions .btn {
    flex: 1;
}

.form-actions .btn .material-symbols-outlined {
    margin-right: 8px;
}

.form-grid .form-group>label {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.label-with-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- Log & Info Containers --- */
.log-container {
    font-family: monospace;
    font-size: 0.9em;
    background-color: #fafafa;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 8px;
    padding: 16px;
    min-height: 150px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
}

.log-container p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.log-success {
    color: var(--log-color-success);
}

.log-error {
    color: var(--log-color-error);
}

.log-warning {
    color: var(--log-color-warning);
}

.log-info {
    color: var(--log-color-info);
    font-weight: bold;
}

/* --- Menu & Cards --- */
.menu-header {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    margin-bottom: 32px;
}

.menu-header h2 {
    margin: 0;
}

.menu-header p {
    margin-top: 4px;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.menu-card {
    position: relative;
    padding: 24px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 16px;
    background-color: var(--md-sys-color-surface-container-highest);
    transition:
        box-shadow 0.2s ease-in-out,
        transform 0.2s ease-in-out;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
}

.menu-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.menu-card-icon-wrapper {
    background-color: #e8eaf6;
    border-radius: 50%;
    padding: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-card-icon-wrapper .material-symbols-outlined {
    color: var(--md-sys-color-primary);
}

.menu-card .material-symbols-outlined {
    font-size: 32px;
}

.menu-card-content {
    flex: 1;
}

.menu-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: var(--md-sys-color-on-surface);
}

.menu-card p {
    margin: 0;
    font-size: 0.9rem;
}

.menu-card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--md-sys-color-on-surface-variant) !important;
    font-size: 24px !important;
    opacity: 0.5;
    transition:
        opacity 0.2s ease-in-out,
        right 0.2s ease-in-out;
}

.menu-card:hover .menu-card-arrow {
    opacity: 1;
    right: 20px;
}

#goto-hub-card .menu-card-icon-wrapper {
    background-color: #e0e0e0;
}

#goto-hub-card .material-symbols-outlined {
    color: #5f6368;
}
