/* Custom Styles for Blazor App */

:root {
    --primary-color: #89BC4B;
    --primary-dark: #6fa036;
    --secondary-color: #5cb85c;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1e293b;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #89BC4B 0%, #6fa036 100%);
    --gradient-secondary: linear-gradient(135deg, #a8d96e 0%, #5cb85c 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #89BC4B 0%, #6fa036 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 300px;
    animation: fadeInUp 0.6s ease-out;
}

.login-logo {
    text-align: center;
    margin-bottom: 12px;
    padding: 4px;
    animation: zoomIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-logo img {
    width: 130px;
    height: auto;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.12));
    transition: all 0.4s ease;
}

.login-logo img:hover {
    transform: scale(1.03) translateY(-5px);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.2));
}

.login-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
    text-align: center;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 18px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.form-control {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(137, 188, 75, 0.2);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
}

.btn-aceptar {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    box-shadow: var(--shadow-md);
}

.btn-aceptar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-aceptar:active {
    transform: translateY(0);
}

.forgot-password-container {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 4px;
}

.forgot-password-link {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.forgot-password-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

.login-separator::before,
.login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.login-separator:not(:empty)::before {
    margin-right: .5em;
}

.login-separator:not(:empty)::after {
    margin-left: .5em;
}

.btn-secondary-action {
    background: var(--gradient-secondary);
    margin: 0 auto;
    padding: 6px 16px;
    font-size: 0.75rem;
    width: fit-content;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: white !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    opacity: 0.95;
}

.config-icon:hover {
    transform: rotate(90deg) scale(1.1);
    color: #e2e8f0;
}

/* Menu Styles */
.menu-container {
    min-height: 100vh;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.menu-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.6s ease-out;
}

.menu-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.menu-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.menu-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
}

.menu-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.menu-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.menu-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.logout-card {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.logout-card h3,
.logout-card p {
    color: white;
}

/* Page Styles */
.page-container {
    min-height: 100vh;
    padding: 30px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.content-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.content-card>p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Table Styles */
.filter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gradient-primary);
    color: white;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
}

.data-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(137, 188, 75, 0.1);
}

.no-data {
    text-align: center !important;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 30px;
    }

    .login-title {
        font-size: 2rem;
    }

    .menu-header h1 {
        font-size: 2rem;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .content-card {
        padding: 30px 20px;
    }

    .filter-section {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: modalScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-modal-confirm {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-modal-cancel {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-modal-cancel:hover {
    background: #e2e8f0;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalScaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}