/* Header Styles - Shared across all views */
.main-content > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px var(--main-padding);
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0 !important;
    right: 0;
    z-index: 1300; /* Por encima del sidebar */
    height: 85px;
    box-sizing: border-box;
    width: 100% !important;
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo-img {
    max-height: 70px;
    height: auto;
    width: auto;
}

.header-logo .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.search-bar {
    background: var(--bg-white);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    width: 300px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.search-bar input {
    border: none;
    outline: none;
    margin-left: 10px;
    width: 100%;
    color: var(--text-light);
    background: transparent;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile-container {
    position: relative;
}

.user-profile-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #eef0f2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-item {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #f5f5f5;
}

/* Header icon buttons - notifications and calendar */
.header-icon-button {
    position: relative;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.header-icon-button .navbar-icon {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease;
}

.header-icon-button .default-icon {
    opacity: 1;
    position: relative;
}

.header-icon-button .hover-icon {
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.header-icon-button:hover .default-icon {
    opacity: 0;
}

.header-icon-button:hover .hover-icon {
    opacity: 1;
}

/* Language switch EN | ES */
.greensoft-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 2px;
    user-select: none;
}

.greensoft-lang-btn {
    border: none;
    background: transparent;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #9aa0a6;
    cursor: pointer;
    line-height: 1;
}

.greensoft-lang-btn.is-active {
    color: #089e49;
}

.greensoft-lang-btn:hover {
    color: #067a38;
}

.greensoft-lang-sep {
    color: #c5c9ce;
    font-size: 12px;
    font-weight: 400;
}

/* When panel is open, keep green icon visible */
.header-icon-button.active .default-icon {
    opacity: 0;
}

.header-icon-button.active .hover-icon {
    opacity: 1;
}

/* Special Greeny Button */
.special-greeny-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* keep old rules inert if overridden elsewhere */
.special-greeny-btn:not([data-keep]) {
    display: none !important;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.special-greeny-btn:hover {
    background: linear-gradient(135deg, #5b4cdb, #8c82fc);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.45);
    color: #fff;
    text-decoration: none;
}

.special-greeny-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(108, 92, 231, 0.2);
}

.special-greeny-btn i {
    font-size: 12px;
    color: #ffd700;
}

/* Dashboard Variables - if not already defined */
:root {
    --primary-green: #2ecc71;
    --dark-green: #27ae60;
    --text-dark: #333;
    --text-light: #888;
    --bg-body: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #eef0f2;
    --danger: #e74c3c;
}
