/* --- VARIABLES & RESET --- */
:root {
    --primary: #10B981;
    --primary-hover: #059669;
    --bg-darker: #000000;
    --bg-dark: #111827;
    --text-black: #000000;
    --text-muted: #4b5563; /* gray-600 */
    --border: #e5e7eb;
    --input-bg: #ffffff;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
}

/* --- LAYOUT --- */
.page-background {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    /* Equivalent de bg-gradient-to-br from-black via-gray-900 to-black */
    background: linear-gradient(to bottom right, var(--bg-darker), var(--bg-dark), var(--bg-darker));
}

/* --- CARD (Shadcn UI Style) --- */
.card {
    width: 100%;
    max-width: 28rem; /* max-w-md */
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    text-align: center;
    padding: 1.5rem;
    padding-bottom: 0;
}

.icon-wrapper {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem auto;
    background: linear-gradient(to bottom right, var(--primary), var(--primary-hover));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-zap {
    width: 2rem;
    height: 2rem;
    color: #ffffff;
}

.card-title {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600;
    line-height: 1.2;
}

.text-black { color: var(--text-black); }
.text-primary { color: var(--primary); }

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem; /* text-sm */
    margin-top: 0.5rem;
}

.card-content {
    padding: 1.5rem;
}

/* --- FORMS --- */
.space-y-4 > * + * {
    margin-top: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-black);
}

.input-relative {
    position: relative;
}

.input-relative input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.5rem; /* pl-10 pour l'icône */
    border: 1px solid var(--border);
    border-radius: 0.375rem; /* rounded-md */
    background-color: var(--input-bg);
    font-size: 0.875rem;
    color: var(--text-black);
    outline: none;
    transition: all 0.2s;
}

.input-relative input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); /* ring focus */
}

.icon-lock {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af; /* text-gray-400 */
}

/* --- BUTTON --- */
.btn-primary {
    width: 100%;
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- CREDENTIALS BOX --- */
.credentials-info {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.credentials-box {
    font-family: monospace;
    font-size: 0.75rem;
    background-color: #f3f4f6; /* bg-gray-100 */
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    color: var(--text-black);
}

/* --- TOAST NOTIFICATIONS (Sonner clone) --- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: var(--primary);
}

.toast-error {
    background-color: var(--danger);
}