/* Global base styles and component classes for justcoolen. */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #374151;
}

.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    color: #111827;
}

.input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn-primary {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #4f46e5;
    color: #ffffff;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    color: #4f46e5;
    border: 1px solid #4f46e5;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #eef2ff;
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: transparent;
    color: #4f46e5;
    border: 1px solid #4f46e5;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-outline:hover {
    background-color: #eef2ff;
}

.btn-danger {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #dc2626;
    color: #ffffff;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.error-text {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.flash-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.flash-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.flash-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.log-viewer {
    background-color: #111827;
    color: #f3f4f6;
}

table th,
table td {
    border: 1px solid #e5e7eb;
}

dialog.modal {
    border: none;
    border-radius: 0.5rem;
    padding: 0;
    max-width: 90vw;
    width: 42rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

dialog.modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-header,
.modal-body,
.modal-footer {
    padding: 1rem 1.5rem;
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

.modal-close:hover {
    color: #111827;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.sortable-ghost {
    opacity: 0.4;
    background: #eef2ff;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu summary::marker {
    display: none;
}

.user-menu[open] .user-menu-dropdown {
    display: block;
}

.toast-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    background: #374151;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-success {
    background: #166534;
}

.toast-error {
    background: #991b1b;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
    color: #4f46e5;
    background-color: #eef2ff;
}

.nav-link-active {
    color: #4338ca;
    background-color: #eef2ff;
}

.nav-mobile-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
}

.nav-mobile-link:hover {
    color: #4f46e5;
    background-color: #eef2ff;
}

.nav-mobile-link-active {
    color: #4338ca;
    background-color: #eef2ff;
}

.nav-avatar {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #eef2ff;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 700;
}
