/* css/style.css */

/* Reset și variabile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Culori principale */
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;

    /* Culori neutre */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Tranziții */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Body și fundal gradient */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Container principal */
.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Card de login */
.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.logo p {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form-uri */
.form {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form.active {
    display: block;
}

.form h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form p {
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Grupuri de input */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background-color: var(--white);
    color: var(--gray-800);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input:valid,
.input-group select:valid {
    border-color: var(--gray-300);
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    padding: 0 0.25rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:valid + label,
.input-group select:focus + label,
.input-group select:valid + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Butoane */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Link-uri form */
.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.form-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.form-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* reCAPTCHA */
.g-recaptcha {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

/* Notificări */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform var(--transition-normal);
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: var(--success-color);
    color: var(--white);
}

.notification.error {
    background-color: var(--error-color);
    color: var(--white);
}

.notification.warning {
    background-color: var(--warning-color);
    color: var(--white);
}

.notification.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .logo h1 {
        font-size: 1.75rem;
    }

    .form h2 {
        font-size: 1.25rem;
    }

    .form-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .notification {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* Loading state */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus vizibil pentru accesibilitate */
input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Stiluri pentru select */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.input-group select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667eea'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Efect de hover subtil pe card */
.login-card {
    transition: transform var(--transition-normal);
}

.login-card:hover {
    transform: translateY(-2px);
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    z-index: 10000;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.header img.left-logo {
    position: absolute;
    left: 25px;
    top: 50%;
    width: 2mm;      /* fixăm dimensiunea în milimetri */
    height: 2mm;
    max-width: 2mm;  /* forțăm mPDF să nu scaleze */
    max-height: 2mm;
    transform: translateY(-50%);
}
.header img.right-logo {
    position: absolute;
    right: 25px;
    top: 50%;
    width: 2mm;
    height: 2mm;
    max-width: 2mm;
    max-height: 2mm;
    transform: translateY(-50%);
}
