/**
 * ============================================================================
 * RezStack Main CSS - Complete Styling
 * ============================================================================
 *
 * File: /RezStack/shared/assets/css/rezstack-main.css
 * Version: v1.0.012
 * Created: 2026-02-11
 * Updated: 2026-02-12
 * 
 * PURPOSE: Shared CSS for all RezStack applications
 * STATUS: PRODUCTION - Used by all RezStack pages (index.php, admin.php, super-admin.php, etc.)
 *
 * ============================================================================
 * CHANGELOG
 * ============================================================================
 *
 * v1.0.012 - 2026-02-12 - REMOVE HARDCODED CUSTOM PROPERTY FROM BODY
 *   - [FIX] Removed --active-tab-color: #7b6f96 from body CSS rule
 *   - [REASON] CSS rule was overriding inline style on body tag
 *   - [RESULT] Inline style --active-tab-color: #3B91E6 now takes precedence
 *   - [RESULT] Canvas boxes now correctly show blue (#3B91E6) for RezCall tab
 *
 * v1.0.011 - 2026-02-12 - FORCE COLORED CANVAS BOXES WITH !important
 *   - [FIX] Admin page .canvas divs now force background color with !important
 *   - [FIX] Overrides inline styles (e.g., background: #f0f7ff) on canvas boxes
 *   - [ADD] Transparent background for .canvas-body (removes light blue border-left)
 *   - [ADD] White text color for all canvas content
 *   - [RESULT] Canvas boxes now match active tab color (blue for RezCall, teal for RezInsights, etc.)
 *
 * v1.0.010 - 2026-02-11 - WHITE BACKGROUND FOR INDEX, COLORED FOR ADMIN
 *   - [FIX] Index.php body-content now white (not colored)
 *   - [FIX] Only admin.php tab content areas get colored backgrounds
 *   - [CHANGE] Use body.admin-page class to differentiate page styles
 *   - [CHANGE] Section titles dark on white (index), white on colored (admin)
 *   - [CHANGE] Tables maintain white background everywhere
 *   - [RESULT] Index.php clean white interface, admin.php colored per tab
 *
 * v1.0.009 - 2026-02-11 - FOLDER-STYLE TABS WITH CORRECT LAYOUT
 *   - [FIX] Body-canvas reverted to white (only content area colored)
 *   - [FIX] Nav-sidebar reverted to white background with dark text
 *   - [FIX] Footer-canvas reverted to white
 *   - [FIX] Only body-content div gets colored background (right side)
 *   - [IMPROVE] Folder tab styling with slanted right edge via clip-path
 *   - [ADD] Tab colors match background: RezStack #7b6f96, RezCall #3B91E6, RezInsights #61A4AB, RezPost #AB6861
 *   - [RESULT] Header/Nav/Footer white, content area colored, folder-style tabs with slanted edges
 *
 * v1.0.008 - 2026-02-11 - FOLDER-STYLE TABS WITH COLOR THEMING
 *   - [ADD] Folder-style tab design with slanted edges (clip-path)
 *   - [ADD] Tab colors: RezStack #7b6f96, RezCall #3B91E6, RezInsights #61A4AB, RezPost #AB6861
 *   - [ADD] Body background color changes with active tab (CSS custom property --active-tab-color)
 *   - [ADD] Tab button styling with hover and active states
 *   - [CHANGE] Tab text color to black for better contrast on colored backgrounds
 *   - [ADD] Tab transition effects on click
 *   - [ADD] Body color applies to body-canvas and footer-canvas backgrounds
 *   - [RESULT] Folder-style tabs match selected color theme throughout page
 *
 * v1.0.007 - 2026-02-11 - COMPLETE STYLING MERGE FROM SUPER-ADMIN
 *   - [MERGE] All CSS from super-admin.php embedded styles (lines 64-416)
 *   - [FIX] Canvas elements now WHITE (visible) on purple gradient background
 *   - [ADD] Header-right styling for user name and badge
 *   - [ADD] Badge-admin styling (.badge-admin class)
 *   - [ADD] Complete table styling
 *   - [ADD] Modal styling (approve/edit)
 *   - [ADD] Alert styling (success/error)
 *   - [ADD] Navigation styling
 *   - [ADD] Footer styling with flex layout
 *   - [ADD] Login form styling (.login-container, .login-box, .login-tabs, .tab-content)
 *   - [RESULT] Single complete CSS file for all pages
 *
 * v1.0.006 - 2026-02-11 - ATTEMPTED SYNTAX FIX
 *   - Had orphaned CSS properties causing parser to break
 *   - Gradient showed but canvases were off-white, blocking view
 *
 * v1.0.005 - 2026-02-10 - INITIAL SHARED CSS
 *   - Extracted from index.php embedded styles
 *   - Incomplete - missing many necessary styles
 *
 * ============================================================================
 */

/* Reset and Base */
* {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-attachment: fixed;
}

/* ============================================================================
 * LOGIN PAGE STYLES
 * ============================================================================ */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

.login-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    flex: 0 0 auto;
    padding: 12px 28px;
    border: none;
    color: black;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: none;
    margin-bottom: 0;
    transition: all 0.3s;
    position: relative;
    margin-right: 8px;
    /* Folder tab shape: slanted right edge */
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Individual tab colors based on data-tab attribute */
.tab-button[data-tab="rezstack"] {
    background: #7b6f96;
}

.tab-button[data-tab="rezcall"] {
    background: #3B91E6;
}

.tab-button[data-tab="rezinsights"] {
    background: #61A4AB;
}

.tab-button[data-tab="rezpost"] {
    background: #AB6861;
}

.tab-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tab-button.active {
    color: black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

/* LOGIN PAGE TABS - Different styling from admin tabs */
.login-tabs .tab-button {
    flex: 1;
    padding: 12px 0;
    background: none !important;
    color: #999;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    margin-right: 10px;
    clip-path: none;
    box-shadow: none;
    font-weight: 600;
}

.login-tabs .tab-button:hover {
    color: #667eea;
    opacity: 1;
    transform: none;
    box-shadow: none;
}

.login-tabs .tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    box-shadow: none;
    transform: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ============================================================================
 * DASHBOARD STYLES
 * ============================================================================ */

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 20px;
    margin: 0;
    background: transparent;
}

/* HEADER CANVAS */
.header-canvas {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
    margin: 0;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

.header-center {
    flex: 1;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    font-family: Tahoma, Verdana, Monaco, sans-serif;
    color: #5D0565;
}

.header-left p {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
}

.header-right {
    text-align: right;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-info .user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-info .user-email {
    font-size: 12px;
    color: #666;
}

.user-role {
    font-size: 12px;
    color: #666;
}

.badge-admin {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
}

.badge-user {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
}

/* BODY CANVAS */
.body-canvas {
    background: white;
    border-radius: 8px;
    padding: 20px 25px;
    flex: 1;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 30px;
}

.nav-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-right: 2px solid #eee;
    padding-right: 20px;
    min-width: 150px;
}

.nav-sidebar a,
.nav-sidebar button {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-sidebar a:hover,
.nav-sidebar button:hover {
    color: #764ba2;
}

.nav-sidebar a.active {
    color: #764ba2;
    font-weight: 600;
}

.nav-sidebar button {
    padding: 10px 15px;
    background: #dc3545;
    color: white;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 600;
}

.nav-sidebar button:hover {
    background: #c82333;
    color: white;
}

.nav-sidebar hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 10px 0;
}

.body-content {
    flex: 1;
    background: white;
    border-radius: 0;
    padding: 25px;
    color: #333;
    transition: background-color 0.3s ease;
}

/* Admin pages - colored background for tab content */
body.admin-page .body-content {
    background: white;
    color: #333;
}

body.admin-page .canvas {
    background: var(--active-tab-color, #7b6f96) !important;
    border-radius: 8px;
    padding: 25px;
    color: white;
    margin-bottom: 20px;
}

body.admin-page .canvas-header {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

body.admin-page .canvas-header h2 {
    color: white !important;
}

body.admin-page .canvas-body {
    background: transparent !important;
    border-left: none !important;
    padding: 0 !important;
    color: white;
}

.app-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.app-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    color: white;
    transition: all 0.3s;
}

.app-btn.rezcall {
    background: #0066FF;
}

.app-btn.rezcall:hover {
    background: #0052CC;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.3);
}

.app-btn.rezinsights {
    background: #1FE0B6;
    color: #333;
}

.app-btn.rezinsights:hover {
    background: #00C99A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(31, 224, 182, 0.3);
}

.app-btn.rezpost {
    background: #FF6B35;
}

.app-btn.rezpost:hover {
    background: #E55A28;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* FOOTER CANVAS */
.footer-canvas {
    background: white;
    border-radius: 8px;
    padding: 20px 25px 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 12px;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    margin: 0;
}

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-right {
    flex: 1;
    text-align: right;
    padding-right: 10px;
}

/* ============================================================================
 * SECTION AND TABLE STYLES
 * ============================================================================ */

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* Admin pages - white title on colored background */
body.admin-page .section-title {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

thead {
    background: #f5f5f5;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    border-bottom: 2px solid #ddd;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #333;
}

tr:hover {
    background: #fafafa;
}

/* Admin pages - maintain white tables on colored background */
body.admin-page table {
    background: rgba(255, 255, 255, 0.95);
}

body.admin-page thead {
    background: rgba(255, 255, 255, 0.98);
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-approve {
    background: #28a745;
    color: white;
}

.btn-approve:hover {
    background: #218838;
}

.btn-deny {
    background: #dc3545;
    color: white;
}

.btn-deny:hover {
    background: #c82333;
}

.btn-edit {
    background: #667eea;
    color: white;
}

.btn-edit:hover {
    background: #764ba2;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* ============================================================================
 * MODAL STYLES
 * ============================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-save {
    flex: 1;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-save:hover {
    background: #764ba2;
}

.btn-cancel {
    flex: 1;
    padding: 10px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* ============================================================================
 * ALERT STYLES
 * ============================================================================ */

.alert {
    display: none;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}