@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --corp-green: #32775f;
    --corp-green-dark: #265d4a;
    --corp-green-light: #45a886;
    --corp-orange: #f39c12;
    --corp-orange-hover: #e67e22;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --text-main: #333333;
    --text-muted: #666666;
    --radius-lg: 25px;
    --radius-md: 15px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    background-image: url('fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base Wrapper */
.wrap {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

/* Header Layout */
.header-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 40px !important;
    gap: 30px !important;
    min-height: 140px !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.header-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.header-title {
    color: var(--corp-green);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-center {
    display: none;
}

.header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Admin Specific Header Override */
.admin-header .header-left {
    flex-direction: row !important;
    gap: 25px !important;
    align-items: center !important;
}

.admin-header .header-right {
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 15px !important;
}

.header-btns-top, .header-btns-bottom {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Logo Fixes */
.logo-circle {
    width: 110px;
    height: 110px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    padding: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-circle img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* User Badge */
.user-badge {
    background: #e8f5f0;
    color: var(--corp-green);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 12px;
    padding: 5px 0;
    overflow: hidden;
    border: 1px solid #edf2f7;
    text-align: left;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.dropdown-content a:hover {
    background-color: #f1f7f5;
    color: var(--corp-green);
}

/* Inputs & Buttons */
.form-input {
    width: 100%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 15px 20px;
    color: #1e293b;
    font-family: inherit;
    font-size: 1rem;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-corp {
    background: var(--corp-green);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
    text-decoration: none;
}

.btn-corp:hover {
    background: var(--corp-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(50, 119, 95, 0.3);
}

.btn-orange {
    background: var(--corp-orange);
}

.btn-orange:hover {
    background: var(--corp-orange-hover);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

/* Base Elements */
#drop-zone {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#drop-zone .drop-zone-icon {
    font-size: 40px;
    color: var(--corp-green);
    margin-bottom: 10px;
}

.hidden { display: none !important; }

/* Progress Bar */
#progress-bar-container {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

#progress-bar-fill {
    height: 100%;
    background: var(--corp-green);
    width: 0;
}

/* Responsive */
.lang-selector { display: flex; gap: 10px; align-items: center; }
.lang-selector a { 
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none; 
    padding: 2px; 
    border-radius: 4px; 
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.lang-selector a img { 
    display: block; 
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    filter: grayscale(0.2);
}
.lang-selector a:hover { transform: translateY(-2px); }
.lang-selector a:hover img { filter: grayscale(0); }
.lang-selector a.active { background: rgba(50, 119, 95, 0.1); border-color: rgba(50, 119, 95, 0.2); }
.lang-selector a.active img { filter: grayscale(0); transform: scale(1.1); }

/* News Modal */
.news-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.news-overlay.show { opacity: 1; visibility: visible; }
.news-modal {
    background: white;
    max-width: 700px;
    width: 100%;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.news-overlay.show .news-modal { transform: translateY(0); }
.news-modal h2 { color: var(--corp-green); font-size: 1.6rem; margin-bottom: 25px; font-weight: 700; white-space: nowrap; }
.news-list { text-align: left; list-style: none; margin: 30px 0; display: flex; flex-direction: column; gap: 20px; }
.news-list li { 
    font-size: 1.05rem; 
    color: var(--text-main); 
    display: grid;
    grid-template-columns: 35px 130px 1fr;
    align-items: start;
    gap: 10px;
    line-height: 1.4;
}
.news-list b { 
    color: var(--corp-green-dark); 
    white-space: nowrap; 
}
.news-modal .btn-corp {
    background: var(--corp-green-dark);
    padding: 18px;
    width: 100%;
    border-radius: 100px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Admin Tables */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}
.admin-table th {
    background: rgba(50, 119, 95, 0.05);
    color: var(--corp-green);
    font-weight: 700;
    padding: 15px 20px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(50, 119, 95, 0.1);
}
.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover { background: rgba(50, 119, 95, 0.02); }

/* Badges */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.tag.admin { background: #fee2e2; color: #dc2626; }
.tag.user { background: #dcfce7; color: #16a34a; }
.tag.externo { background: #fef9c3; color: #854d0e; }
.tag.on { background: #dcfce7; color: #16a34a; }
.tag.off { background: #f1f5f9; color: #64748b; }

@media (max-width: 900px) {
    .header-card { 
        flex-direction: column !important; 
        height: auto !important; 
        padding: 30px 20px !important;
    }
    .header-left, .header-center, .header-right { 
        justify-content: center; 
        align-items: center;
        flex: none;
        width: 100%;
    }
    .header-right { gap: 15px; text-align: center; }
}
.hidden { display: none !important; }