/* ========================================
   POPUP STYLES - Modern Theme
   Matches main application color scheme
   ======================================== */

/* Variables matching main theme */
:root {
    --popup-header-bg: #1E3A5F;
    --popup-header-bg-light: #2D4A6F;
    --popup-body-bg: #F1F5F9;
    --popup-text-white: #FFFFFF;
    --popup-text-muted: rgba(255, 255, 255, 0.75);
    --popup-accent: #10B981;
}

/* Reset old styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--popup-body-bg);
}

/* Hide old header table styling */
.headTable {
    display: none !important;
}

/* ========================================
   POPUP HEADER
   ======================================== */
.popup-header {
    background: linear-gradient(135deg, var(--popup-header-bg) 0%, var(--popup-header-bg-light) 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.popup-logo img {
    height: 40px;
    width: auto;
}

.popup-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popup-username {
    color: var(--popup-text-white);
    font-size: 14px;
    font-weight: 500;
}

.popup-date {
    color: var(--popup-text-muted);
    font-size: 12px;
}

.popup-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.popup-close-btn {
    padding: 8px 16px;
    background: var(--popup-accent);
    color: var(--popup-text-white) !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.popup-close-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ========================================
   POPUP CONTENT AREA
   ======================================== */
#content_wrapper_table {
    background: #FFFFFF;
    margin: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 16px;
}

/* ========================================
   POPUP FOOTER
   ======================================== */
.popup-footer {
    background: var(--popup-header-bg);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.popup-footer-text {
    color: var(--popup-text-muted);
    font-size: 12px;
}

.popup-footer-text a {
    color: var(--popup-text-white);
    text-decoration: none;
}

.popup-footer-text a:hover {
    text-decoration: underline;
}

/* Hide old footer */
.footer {
    display: none !important;
}

/* ========================================
   FORM ELEMENTS - Modern styling
   ======================================== */
.popup-header input[type="text"],
.popup-header input[type="password"],
.popup-header select {
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
}

/* ========================================
   OLD STYLE OVERRIDES
   ======================================== */
/* Override old topbar styles */
.topbarlink {
    color: var(--popup-text-white) !important;
    text-decoration: none;
}

.userName, .todayDate {
    background: transparent !important;
}

/* Override old logo styles */
.logoInn {
    display: none !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media screen and (max-width: 768px) {
    .popup-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .popup-header-left,
    .popup-header-right {
        width: 100%;
        justify-content: space-between;
    }

    #content_wrapper_table {
        margin: 12px;
        padding: 12px;
    }
}
