/* style.css */
:root {
    --primary-green: #48d154; 
    --primary-green-hover: #3eb547;
    --border-color: #d1d5db;
    --text-color: #555555;
    --text-light: #777777;
    --bg-body: #ebf0f7; /* Changed from dark to a light blueish-gray for dashboard */
    --icon-bg: #e9ecef;
    --purple-accent: #6200ea;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

#app {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Modal Container (Login) */
.login-modal {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.modal-header {
    background-color: var(--primary-green);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 400;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

/* Body */
.modal-body {
    padding: 20px;
}

.divider {
    border: 0;
    height: 1px;
    background: #eaeaea;
    margin-bottom: 20px;
}

/* Form Inputs */
.input-group {
    display: flex;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 5px rgba(72, 209, 84, 0.3);
}

.input-icon-left {
    background-color: var(--icon-bg);
    padding: 10px 15px;
    color: #6c757d;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
}

.input-group input::placeholder {
    color: #adb5bd;
}

.input-icon-right {
    padding: 10px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-right i {
    color: #000;
    background-color: #00e676;
    padding: 4px;
    border-radius: 50%;
    font-size: 0.7rem;
    border: 1px solid #000;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #38a543;
    border-radius: 3px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-green-hover);
}

/* Forgot Password & Register */
.forgot-password {
    text-align: center;
    margin: 15px 0;
}

.forgot-password a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.register-section {
    text-align: center;
    margin-top: 15px;
}

.register-section p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}


/* ========================================= */
/* DASHBOARD STYLES */
/* ========================================= */
.dashboard-container {
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 0.5s ease-out;
}

.dashboard-title {
    text-align: center;
    color: #2c3e50;
    font-weight: 400;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.user-bar {
    background: #ffffff;
    border-radius: 20px;
    padding: 10px 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--purple-accent);
}

.user-role {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.dashboard-card h3 {
    color: #555;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.dashboard-card p {
    color: #888;
    font-size: 0.85rem;
}

/* ========================================= */
/* CATALOG STYLES */
/* ========================================= */
.catalog-container {
    width: 100%;
    max-width: 1000px;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    animation: fadeIn 0.4s ease-out;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-regresar {
    background-color: #5d25f7; /* Purple matching screenshot */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-regresar:hover {
    background-color: #4a1cd3;
}

.btn-regresar:active {
    transform: scale(0.95);
}

.btn-carrito {
    background-color: #008c52; /* Dark green matching screenshot */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-carrito:hover {
    background-color: #007041;
}

.badge-rojo {
    background-color: #e5004f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
}

.catalog-title {
    text-align: center;
    font-weight: 400;
    color: #333;
    font-size: 2rem;
    margin-bottom: 30px;
}

.catalog-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-input, .filter-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus, .filter-select:focus {
    border-color: #5d25f7;
}

.catalog-placeholder {
    text-align: center;
    padding: 40px 0;
}

.placeholder-main {
    color: #8c98a4;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.placeholder-main i {
    color: #a7b5c4;
}

.placeholder-sub {
    color: #666;
    font-size: 0.9rem;
}

/* ========================================= */
/* PROJECT STYLES */
/* ========================================= */
.project-container {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.4s ease-out;
}

.project-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.project-header {
    background-color: #3b0ff5; /* Match purple from screenshot */
    color: white;
    padding: 15px;
    text-align: center;
}

.project-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.project-header i {
    margin-right: 8px;
}

.project-body {
    padding: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-control {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    border-color: #3b0ff5;
}

.bg-light {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.w-50 { width: 50%; }

.dropzone {
    border: 1px dashed #3b0ff5;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #555;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.dropzone:hover {
    background-color: #f8f6ff;
}

.btn-submit-project {
    background-color: #008c52;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-submit-project:hover {
    background-color: #007041;
}

.btn-submit-project:active {
    transform: scale(0.95);
}

/* ========================================= */
/* GESTION STYLES */
/* ========================================= */
.gestion-container {
    width: 100%;
    max-width: 1100px;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    animation: fadeIn 0.4s ease-out;
}

.gestion-title {
    font-weight: 300;
    color: #666;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #555;
}

.datatable-select, .datatable-search {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
}

.datatable-search {
    margin-left: 5px;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.datatable {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
}

.datatable th, .datatable td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
}

.datatable th {
    background-color: #ffffff;
    color: #333;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.datatable tbody tr {
    background-color: #f8f9fa;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

.table-pagination {
    display: flex;
}

.btn-page {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    color: #6c757d;
    cursor: not-allowed;
    outline: none;
}

.btn-page:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-page:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-left: none;
}
