/* Eudonet Internal Tools - Base Styles */

/* Reset and base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Skip link for keyboard navigation (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo {
    height: 40px;
    width: auto;
    margin-right: 1rem;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Hero section */
.hero {
    background: #fff;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

/* Utility classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: #5568d3;
    color: #fff;
}

.btn-primary:hover {
    background: #4a5bc0;
}

.btn-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.login-container {
    background: #fff;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.login-container .form-group {
    margin-bottom: 1.5rem;
}

.login-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.login-container .form-group input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-container .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-container .btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

.login-container .help-text {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* Logout page */
.logout-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.logout-card {
    background: #fff;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logout-card h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.logout-card p {
    margin-bottom: 0.75rem;
    color: #666;
}

.logout-card p:last-of-type {
    margin-bottom: 1.5rem;
}

.logout-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logout-form .btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

/* User navigation */
.user-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-nav .user-email {
    font-size: 0.875rem;
    color: #666;
}

.user-nav .logout-form {
    display: inline;
}

.user-nav .btn-logout {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.user-nav .btn-logout:hover {
    background: #f5f5f5;
    color: #333;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-right: 1rem;
    padding-right: 1rem;
    border-right: 1px solid #ddd;
}

.language-switcher .lang-link {
    color: #666;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.language-switcher .lang-link:hover {
    background: #f5f5f5;
    color: #333;
}

.language-switcher .lang-link.active {
    color: #4c1d95;
    font-weight: 600;
    background: #f0e6ff;
    pointer-events: none;
    cursor: default;
}

.language-switcher .lang-separator {
    color: #ddd;
}

/* Profile completion page */
.profile-complete-container {
    background: #fff;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
}

.profile-complete-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

.profile-complete-container .intro {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

.profile-complete-container .form-group {
    margin-bottom: 1.5rem;
}

.profile-complete-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.profile-complete-container .form-group input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-complete-container .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profile-complete-container .btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

/* Admin Styles */
.admin-nav {
    gap: 0.75rem;
}

.admin-nav .admin-nav-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.admin-nav .admin-nav-link:hover {
    text-decoration: underline;
}

.admin-nav .nav-separator {
    color: #ccc;
}

.admin-container {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.admin-header h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

/* Flash messages */
.flash-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-coming {
    background: #fff3cd;
    color: #856404;
}

.badge-deprecated {
    background: #f8d7da;
    color: #721c24;
}

/* Small button */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #666;
    padding: 2rem;
}

/* Admin form styles */
.admin-form {
    max-width: 700px;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.admin-form .required {
    color: #dc3545;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-form input[readonly],
.admin-form input:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.admin-form .form-help {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #666;
}

.admin-form .form-row {
    display: flex;
    gap: 1.5rem;
}

.admin-form .form-row .form-group {
    flex: 1;
}

.admin-form .form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.admin-form .form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.admin-form .form-checkbox label {
    margin-bottom: 0;
}

.admin-form .form-checkbox .form-help {
    margin-top: 0.25rem;
    margin-left: 1.5rem;
}

.admin-form select[multiple] {
    height: auto;
    min-height: 120px;
}

.admin-form .form-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.admin-form .form-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #666;
}

.admin-form .form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Catalog Styles */
.catalog {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search container */
.search-container {
    margin-bottom: 2rem;
}

.search-container input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Tool section */
.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.coming-section h2 {
    color: rgba(255, 255, 255, 0.9);
}

.deprecated-section h2 {
    color: rgba(255, 255, 255, 0.7);
}

/* Tool grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Tool card */
.tool-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.tool-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

.tool-card-header h3 {
    font-size: 1.125rem;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

/* Status badges for cards */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-badge.badge-active {
    background: #d4edda;
    color: #155724;
}

.status-badge.badge-coming {
    background: #fff3cd;
    color: #856404;
}

.status-badge.badge-deprecated {
    background: #f8d7da;
    color: #721c24;
}

/* Tool description */
.tool-description {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

/* Tool meta */
.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    font-size: 0.8125rem;
}

.added-date {
    color: #888;
}

/* Access indicators */
.access-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.8125rem;
}

.access-indicator.access-public {
    background: #e8f5e9;
    color: #2e7d32;
}

.access-indicator.access-has_access {
    background: #e3f2fd;
    color: #1565c0;
}

.access-indicator.access-coming_no_access {
    background: #fff3e0;
    color: #e65100;
}

.access-indicator.access-request_access {
    background: #fce4ec;
    color: #c62828;
}

/* Tool card actions */
.tool-card-actions {
    display: flex;
    gap: 0.75rem;
}

.tool-card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: #fff;
}

/* Empty message */
.empty-message {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

/* Tool detail page */
.tool-detail {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tool-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.tool-detail-title {
    flex: 1;
}

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.back-link:hover {
    text-decoration: underline;
}

.tool-detail-title h1 {
    font-size: 1.75rem;
    color: #333;
    margin: 0;
}

.tool-detail-header .status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Tool detail content layout */
.tool-detail-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

@media (max-width: 768px) {
    .tool-detail-content {
        grid-template-columns: 1fr;
    }
}

.tool-detail-main {
    min-width: 0;
}

.tool-detail-main .tool-section {
    margin-bottom: 2rem;
}

.tool-detail-main .tool-section h2 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.tool-full-description {
    color: #555;
    line-height: 1.7;
    white-space: pre-wrap;
}

.access-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
}

.access-info .access-indicator {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.access-info p {
    margin: 0;
    color: #666;
    font-size: 0.9375rem;
}

.owners-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.owners-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.owners-list li:last-child {
    border-bottom: none;
}

/* Tool detail sidebar */
.tool-detail-sidebar {
    min-width: 0;
}

.tool-actions {
    margin-bottom: 1.5rem;
}

.tool-actions .btn-large {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.request-access-message {
    color: #666;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.tool-info-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.25rem;
}

.tool-info-card h3 {
    font-size: 0.9375rem;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.tool-info-card dl {
    margin: 0;
}

.tool-info-card dt {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.75rem;
}

.tool-info-card dt:first-child {
    margin-top: 0;
}

.tool-info-card dd {
    font-size: 0.9375rem;
    color: #333;
    margin: 0.25rem 0 0 0;
}

.tool-info-card dd a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

.tool-info-card dd a:hover {
    text-decoration: underline;
}

/* Tool admin card */
.tool-admin-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.25rem;
    margin-top: 1rem;
    border: 1px solid #e0e0e0;
}

.tool-admin-card h3 {
    font-size: 0.9375rem;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Access Management Page */
.access-management {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.access-management .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.access-management .page-header h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.access-mode-info {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #555;
}

.access-mode-info .badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    vertical-align: middle;
}

.badge-public {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-restricted {
    background: #fce4ec;
    color: #c62828;
}

/* Grant access form */
.grant-access-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.grant-access-section h3 {
    font-size: 1.125rem;
    color: #333;
    margin: 0 0 1rem 0;
}

.grant-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.grant-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.grant-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #555;
}

.autocomplete-container {
    position: relative;
}

.autocomplete-container input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.autocomplete-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.autocomplete-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item .autocomplete-name {
    display: block;
    font-weight: 500;
    color: #333;
}

.autocomplete-item .autocomplete-email {
    display: block;
    font-size: 0.8125rem;
    color: #666;
}

.autocomplete-no-results,
.autocomplete-error {
    padding: 1rem;
    color: #666;
    font-style: italic;
}

.autocomplete-error {
    color: #dc3545;
}

/* Access list table */
.access-list-section {
    margin-top: 2rem;
}

.access-list-section h3 {
    font-size: 1.125rem;
    color: #333;
    margin-bottom: 1rem;
}

.access-table {
    width: 100%;
    border-collapse: collapse;
}

.access-table th,
.access-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.access-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.875rem;
}

.access-table tbody tr:hover {
    background: #fafbfc;
}

.access-table .user-name {
    font-weight: 500;
    color: #333;
}

.access-table .user-email {
    color: #666;
    font-size: 0.875rem;
}

.inline-form {
    display: inline;
}

/* Danger button */
.btn-danger {
    background: #dc3545;
    color: #fff;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Empty access list message */
.access-list-section .empty-message {
    color: #666;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Request access section */
.request-access-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.request-access-section h3 {
    font-size: 1.125rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.request-access-section > p {
    color: #666;
    margin-bottom: 1rem;
}

.request-access-section form {
    margin-top: 1rem;
}

.request-access-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.875rem;
}

.request-access-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.request-access-section .btn {
    margin-top: 1rem;
    width: 100%;
}

/* Pending request notice */
.pending-request-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.pending-request-notice p {
    color: #92400e;
    font-weight: 500;
    margin: 0;
}

/* ========================================
   Request View Page
   ======================================== */

.request-view-container {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.request-header h1 {
    font-size: 1.75rem;
    color: #333;
}

.request-details {
    margin-bottom: 2rem;
}

.details-list {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item dt {
    font-weight: 600;
    color: #374151;
}

.detail-item dd {
    color: #6b7280;
}

.request-actions {
    margin-top: 2rem;
}

.request-actions h2 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.action-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.action-form label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.action-form input[type="text"] {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

.action-form input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.approve-form {
    border-color: #d1fae5;
    background: #f0fdf4;
}

.reject-form {
    border-color: #fee2e2;
    background: #fef2f2;
}

/* Already processed banners */
.alert {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.alert-warning {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.alert strong {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.decision-meta {
    margin-top: 1rem;
}

.decision-meta p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

/* Responsive layout for request actions */
@media (max-width: 768px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .detail-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* ========================================
   Homepage Pending Requests Section
   ======================================== */

.pending-requests-section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #f59e0b;
}

.pending-requests-section h2 {
    font-size: 1.125rem;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.request-info {
    flex: 1;
    min-width: 0;
}

.request-info strong {
    color: #333;
}

.request-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.request-info a:hover {
    text-decoration: underline;
}

.request-message {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.request-date {
    display: block;
    margin-top: 0.25rem;
    color: #9ca3af;
    font-size: 0.8125rem;
}

.request-item .request-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: 0;
}

.request-item .inline-form {
    display: inline-flex;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-link {
    background: transparent;
    color: #667eea;
    padding: 0.375rem 0.5rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Responsive layout for pending requests */
@media (max-width: 640px) {
    .request-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .request-item .request-actions {
        margin-top: 0.75rem;
        width: 100%;
        justify-content: flex-start;
    }
}

/* ============================================
   SSO Pages (Denied & Error)
   ============================================ */

.sso-denied,
.sso-error {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.sso-denied-card,
.sso-error-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.sso-denied-card h1,
.sso-error-card h1 {
    color: #dc3545;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.sso-denied-card .denied-message,
.sso-error-card .error-message {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.sso-denied-card .denied-reason,
.sso-error-card .error-help {
    color: #666;
    margin-bottom: 1.5rem;
}

.sso-denied-card .back-link,
.sso-error-card .back-link {
    margin-top: 1.5rem;
}

.sso-denied-card .back-link a,
.sso-error-card .back-link a {
    color: #667eea;
    text-decoration: none;
}

.sso-denied-card .back-link a:hover,
.sso-error-card .back-link a:hover {
    text-decoration: underline;
}

/* ============================================
   Metrics Page
   ============================================ */

.metrics-page {
    max-width: 1000px;
}

.metrics-explanation {
    margin-bottom: 2rem;
}

.metrics-explanation strong {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.metrics-explanation p {
    margin: 0.5rem 0;
}

.metrics-explanation ul {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.metrics-explanation li {
    margin: 0.25rem 0;
}

.date-filter {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.date-filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-weight: 500;
}

.date-filter input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9375rem;
}

.date-filter input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

.date-filter button {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9375rem;
    transition: background 0.2s ease;
}

.date-filter button:hover {
    background: #5568d3;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.metric-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.metric-label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.metrics-table th,
.metrics-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.metrics-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.metrics-table tbody tr:hover {
    background: #fafbfc;
}

.metrics-page h2 {
    font-size: 1.25rem;
    color: #333;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Page header for catalog metrics */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

/* Admin card link spacing */
.tool-admin-card .btn-block + .btn-block {
    margin-top: 0.5rem;
}
