:root {
    --clr-dark-blue: #0A192F; /* KPBN Navy */
    --clr-green: #10B981; /* KPBN Green */
    --clr-lime: #FFE600; /* Yellow accent */
    --clr-white: #ffffff;
    --clr-light: #f8fbfb;
    --clr-gray: #6b7280;
    
    --font-primary: 'Outfit', sans-serif;
    --transition-fast: 0.3s ease;
}

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

html, body {
    font-family: var(--font-primary);
    background-color: var(--clr-light);
    color: var(--clr-dark-blue);
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--clr-green);
    top: -100px;
    left: -100px;
}

.bg-shape-2 {
    width: 500px;
    height: 500px;
    background: var(--clr-dark-blue);
    bottom: -150px;
    right: -100px;
}

.bg-shape-3 {
    width: 300px;
    height: 300px;
    background: var(--clr-dark-blue);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.logo-text.inacom {
    color: var(--clr-dark-blue);
    letter-spacing: -1px;
}

.logo-text.kpbn {
    color: var(--clr-green);
    font-size: 2rem;
}

.app-header h1 {
    font-size: 1.2rem;
    color: var(--clr-gray);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Main Sections */
main {
    flex: 1;
    display: none; /* hidden by default, toggled via JS */
    animation: fadeIn 0.5s ease-out;
}

main.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Upload Card */
.upload-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 49, 64, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.upload-card:hover {
    transform: translateY(-5px);
}

.upload-icon {
    font-size: 4rem;
    color: var(--clr-green);
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

.upload-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--clr-dark-blue);
}

.upload-card p {
    color: var(--clr-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.file-input-wrapper {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    font-family: var(--font-primary);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--clr-green);
    color: var(--clr-white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--clr-white);
    color: var(--clr-dark-blue);
    border: 1px solid rgba(0, 49, 64, 0.1);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--clr-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 49, 64, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.file-info {
    font-size: 0.9rem !important;
    font-style: italic;
    color: var(--clr-orange) !important;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 103, 56, 0.2);
    border-top-color: var(--clr-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Viewer Section */
.viewer-section {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.viewer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-info {
    font-weight: 600;
    color: var(--clr-dark-blue);
    min-width: 100px;
    text-align: center;
}

.zoom-controls {
    display: flex;
    gap: 0.5rem;
}

/* Flipbook Container */
.flipbook-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.flipbook {
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    background-color: #fff;
}

/* Flipbook Page Styling */
.page {
    background-color: white;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    border: 1px solid #ddd;
}
.page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.page.--left {
    border-right: 0;
    box-shadow: inset -7px 0 30px -7px rgba(0, 0, 0, 0.1);
}
.page.--right {
    border-left: 0;
    box-shadow: inset 7px 0 30px -7px rgba(0, 0, 0, 0.1);
}


/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .upload-card {
        padding: 2.5rem 1.2rem;
    }
    .viewer-controls {
        flex-direction: column;
        gap: 1rem;
        border-radius: 20px;
    }
}

/* Extra Styles for Backend Forms and Catalog */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--clr-gray);
}
.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid rgba(0, 49, 64, 0.2);
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}
.input-group input:focus {
    outline: none;
    border-color: var(--clr-green);
    box-shadow: 0 0 0 3px rgba(0, 103, 56, 0.1);
}
.error-msg {
    color: #dc2626;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}
.catalog-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.catalog-item {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-fast);
}
.catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--clr-green);
}
.catalog-item h3 {
    font-size: 1.1rem;
    color: var(--clr-dark-blue);
    word-break: break-all;
}
.catalog-item .meta {
    font-size: 0.85rem;
    color: var(--clr-gray);
    display: flex;
    justify-content: space-between;
}
.catalog-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}
.catalog-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Admin Table */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
.admin-table th { color: var(--clr-dark-blue); font-weight: 600; background: rgba(0,49,64,0.02); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Corporate IR Layout */
.corp-header { 
    background: rgba(10, 25, 47, 0.95); 
    color: white; 
    margin-bottom: 2rem; 
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 2rem;
}
.corp-header-inner { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.corp-nav {
    display: flex;
    align-items: center;
}
.corp-nav a { 
    color: white; 
    text-decoration: none; 
    margin-left: 1.5rem; 
    font-weight: 500; 
    transition: var(--transition-fast); 
    display: flex;
    align-items: center;
    gap: 8px;
}
.corp-nav a:hover { 
    color: var(--clr-green); 
}
.corp-nav .nav-btn { 
    background: rgba(16, 185, 129, 0.2); 
    padding: 0.6rem 1.2rem; 
    border-radius: 50px; 
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.corp-nav .nav-btn:hover {
    background: var(--clr-green);
    color: white;
}

/* Mobile Header elements (hidden on desktop) */
.mobile-header-left {
    display: none;
}
.mobile-menu-toggle {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    color: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.2s;
}
.mobile-menu-toggle:active {
    background: rgba(255, 255, 255, 0.2);
}
.header-divider {
    width: 1px;
    height: 44px;
    background: rgba(255, 255, 255, 0.5);
}

.corp-hero { background: linear-gradient(135deg, var(--clr-green) 0%, var(--clr-dark-blue) 100%); color: white; padding: 4rem 2rem; }
.corp-container { max-width: 1200px; margin: 0 auto; }
.corp-hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.corp-hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; }

.corp-main { padding: 4rem 2rem; background: var(--clr-light); }
.corp-content { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; }
.corp-menu { list-style: none; }
.corp-menu li { margin-bottom: 0.5rem; }
.corp-menu a { display: block; padding: 0.8rem 1rem; color: var(--clr-gray); text-decoration: none; border-radius: 5px; transition: var(--transition-fast); }
.corp-menu a:hover, .corp-menu a.active { background: white; color: var(--clr-green); font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

.reports-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; border-bottom: 1px solid #ddd; padding-bottom: 1rem; }
.reports-header h2 { color: var(--clr-dark-blue); font-size: 1.8rem; }
.reports-filter select { padding: 0.5rem 2rem 0.5rem 1rem; border: 1px solid #ccc; border-radius: 5px; font-family: var(--font-primary); }

.report-list { display: flex; flex-direction: column; gap: 1rem; }
.report-item { background: white; border: 1px solid #eee; border-radius: 8px; padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem; transition: var(--transition-fast); }
.report-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: var(--clr-lime); }
.report-icon { font-size: 2.5rem; color: #dc2626; background: #fee2e2; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.report-details { flex: 1; }
.report-title { font-size: 1.2rem; font-weight: 600; color: var(--clr-dark-blue); margin-bottom: 0.5rem; }
.report-meta { color: var(--clr-gray); font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.divider { opacity: 0.5; }

.report-actions { display: flex; gap: 1rem; }
.btn-outline-primary { background: transparent; color: var(--clr-green); border: 2px solid var(--clr-green); padding: 0.8rem 2rem; border-radius: 50px; cursor: pointer; transition: 0.3s; font-family: 'Outfit'; font-weight: 600;}
.btn-outline-primary:hover { background: var(--clr-green); color: white; }

.corp-footer { background: var(--clr-dark-blue); color: rgba(255,255,255,0.6); text-align: center; padding: 2rem; font-size: 0.9rem; }

@media(max-width: 768px) { 
    .corp-content { grid-template-columns: 1fr; } 
    .report-item { flex-direction: column; align-items: flex-start; } 
    .report-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; } 
    
    /* Mobile Navbar based on requested design */
    .corp-header {
        background: #007c42;
        border-radius: 0;
        margin-bottom: 0;
        padding: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .corp-header-inner { 
        flex-direction: row; 
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem; 
        padding: 0; 
    }
    
    .mobile-header-left {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
    
    /* Logo scaling and color override for green bg */
    .logo-container { font-size: 2rem; margin-bottom: 0; }
    .logo-text.inacom { color: white !important; }
    .logo-text.kpbn { font-size: 1.2rem; color: white !important; }
    
    /* Dropdown Navigation Menu */
    .corp-nav { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .corp-nav.show {
        display: flex;
    }
    .corp-nav a { 
        margin-left: 0; 
        font-size: 1rem; 
        color: var(--clr-dark-blue) !important;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .corp-nav .nav-btn {
        background: transparent;
        border: none;
        border-radius: 0;
    }
    
    /* Add top padding to container so fixed header doesn't overlap content */
    .app-container { padding: 80px 0.5rem 1rem 0.5rem; }
    
    .viewer-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-radius: 20px;
    }
    
    #btn-back { width: 100%; justify-content: center; }
    
    .page-controls { width: 100%; justify-content: center; gap: 1rem; }
    
    .zoom-controls { width: 100%; }
    .zoom-controls .btn { width: 100%; justify-content: center; }
    
    .app-container { padding: 1rem 0.5rem; }
}
/ *   N E W   U S E R   N A V B A R   S T Y L E S   * /  
 