/*
 * Clarity MDM - custom CSS (complements Tailwind CDN)
 */

/* Toast container */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 24rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: toast-in 0.25s ease-out;
}
.toast.success { background: #047857; }
.toast.error   { background: #b91c1c; }
.toast.warning { background: #b45309; color: white; }
.toast.info    { background: #1e4337; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Buttons */
.btn-primary {
    background: #194d36;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.15s;
}
.btn-primary:hover  { background: #275844; }
.btn-secondary {
    background: #f3f4f6;
    color: #111827;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.15s;
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger {
    background: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.15s;
}
.btn-danger:hover { background: #b91c1c; }

/* Password visibility wrapper */
.password-wrapper {
    position: relative;
}
.password-wrapper .password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
}
.password-wrapper input {
    padding-right: 2.5rem;
}

/* Form controls */
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: #374151; }
.dark .form-label { color: #d1d5db; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dark .form-input, .dark .form-select, .dark .form-textarea {
    background: #1e4337;
    border-color: #275844;
    color: #e5e7eb;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: 0;
    border-color: #72b4a3;
    box-shadow: 0 0 0 3px rgba(114, 180, 163, 0.2);
}

/* Card */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}
.dark .card {
    background: #1e4337;
    border-color: #275844;
}

/* Prose tweaks for dark mode */
.prose-clarity {
    max-width: 72ch;
}
.prose-clarity h2 { color: inherit; }
.prose-clarity a  { color: #367058; }
.dark .prose-clarity a { color: #8fc5ac; }
