﻿/* common.css - Shared styles across all pages */

/* CSS Variables */
        :root {
          /* High-Tech Colors */
          --primary: #0a1628;          /* Deep space blue */
          --secondary: #00d4ff;        /* Cyan accent */
          --accent: #4fc3f7;           /* Light blue */
          --success: #00ff9f;          /* Matrix green */
          --warning: #ffab00;          /* Amber */
          --danger: #ff5252;           /* Red */
          --text: #e8f4f8;             /* Light blue-white */
          --text-dim: #90a4ae;         /* Dimmed text */
          --bg: #0a0e1a;               /* Deep space */
          --bg-panel: rgba(10, 22, 40, 0.9); /* Semi-transparent panels */
          --border: #1e3a5f;           /* Subtle blue border */
          --glow: #00d4ff;             /* Glow color */
          
          /* Typography */
          --font-main: 'Inter', 'Segoe UI', Arial, sans-serif;
          --font-tech: 'JetBrains Mono', 'Consolas', monospace;
        }

/* Reset and Base */
*{margin:0;padding:0;box-sizing:border-box;}
body {font-family: var(--font-main);font-size: 16px;color: var(--text);letter-spacing: 0.3px;
background: linear-gradient(135deg, #0a0e1a 0%, #1a1a2e 50%, #16213e 100%);overflow: hidden;}

/* ==================== HEADINGS */
h1, h2, h3, h4, h5, h6 {font-family: var(--font-tech);color: var(--secondary);margin-bottom: 0.5em;line-height: 1.2;text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);}
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; }
h5 { font-size: 1.1rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

.table-radio-list{font-size:9px;width:100%;}
.table-radio-list td{width:33%;}
.table-radio-list input[type="radio"] {padding:2px;}
.table-radio-list label {vertical-align: text-bottom;padding-left:3px;}

/* Enhanced Button Base Styles */
.btn-base{position:relative !important;overflow:hidden !important;cursor:pointer !important;transition:all 0.3s ease !important;border-radius:8px !important;font-family:var(--font-tech) !important;font-weight:600 !important;text-transform:uppercase !important;letter-spacing:0.5px !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;text-decoration:none !important;border:1px solid var(--border) !important;}
.btn-base::before{content:'' !important;position:absolute !important;top:0 !important;left:-100% !important;width:100% !important;height:100% !important;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.2),transparent) !important;transition:left 0.5s !important;}
.btn-base:hover{transform:translateY(-1px) !important;text-decoration:none !important;}
.btn-base:hover::before{left:100% !important;}
.btn-base:active{transform:translateY(0) !important;}

/* Primary Button Style */
.btn-primary{background:linear-gradient(135deg,var(--primary) 0%,#1e3a5f 100%) !important;color:var(--text) !important;}
.btn-primary:hover{background:linear-gradient(135deg,var(--secondary) 0%,var(--accent) 100%) !important;border-color:var(--glow) !important;color:var(--primary) !important;box-shadow:0 0 20px rgba(0,212,255,0.4) !important;}

/* Danger Button Style */
.btn-danger{background:linear-gradient(135deg,var(--danger) 0%,#d32f2f 100%) !important;color:white !important;border-color:var(--danger) !important;}
.btn-danger:hover{background:linear-gradient(135deg,#d32f2f 0%,#b71c1c 100%) !important;box-shadow:0 0 20px rgba(255,82,82,0.4) !important;color:white !important;}
.btn-danger::before{background:linear-gradient(90deg,transparent,rgba(255,255,255,0.2),transparent) !important;}

/* Success Button Style */
.btn-success{background:linear-gradient(135deg,var(--success) 0%,#43a047 100%) !important;color:var(--primary) !important;border-color:var(--success) !important;}
.btn-success:hover{background:linear-gradient(135deg,#43a047 0%,#388e3c 100%) !important;box-shadow:0 0 20px rgba(76,175,80,0.4) !important;}

/* Warning Button Style */
.btn-warning{background:linear-gradient(135deg,var(--warning) 0%,#f57c00 100%) !important;color:var(--primary) !important;border-color:var(--warning) !important;}
.btn-warning:hover{background:linear-gradient(135deg,#f57c00 0%,#ef6c00 100%) !important;box-shadow:0 0 20px rgba(255,152,0,0.4) !important;}

/* Button Sizes */
.btn-sm{padding:6px 10px !important;font-size:10px !important;height:32px !important;}
.btn-md{padding:8px 12px !important;font-size:12px !important;height:36px !important;}
.btn-lg{padding:10px 16px !important;font-size:14px !important;height:44px !important;}

/* Icon Button */
.btn-icon{width:36px !important;height:36px !important;padding:0 !important;font-size:16px !important;flex-shrink:0 !important;}

/* Full Width Button */
.btn-full{width:100% !important;}

/* Flex Button (for button groups) */
.btn-flex{flex:1 !important;}

/* Standard Button Class - shared styling for ALL buttons */
.btn-standard{background:linear-gradient(135deg,var(--primary) 0%,#1e3a5f 100%) !important;color:var(--text) !important;border:1px solid var(--border) !important;border-radius:8px !important;cursor:pointer !important;font-weight:600 !important;font-family:var(--font-tech) !important;transition:all 0.3s ease !important;text-transform:uppercase !important;letter-spacing:0.5px !important;position:relative !important;overflow:hidden !important;text-align:center !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;}

.btn-standard::before{content:'' !important;position:absolute !important;top:0 !important;left:-100% !important;width:100% !important;height:100% !important;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.2),transparent) !important;transition:left 0.5s !important;}

.btn-standard:hover{background:linear-gradient(135deg,var(--secondary) 0%,var(--accent) 100%) !important;border-color:var(--glow) !important;color:var(--primary) !important;box-shadow:0 0 20px rgba(0,212,255,0.4) !important;transform:translateY(-1px) !important;}

.btn-standard:hover::before{left:100% !important;}

.btn-standard:active{transform:translateY(0) !important;box-shadow:0 0 10px rgba(0,212,255,0.6) !important;}

/* Panel Styles */
.panel-header {display: flex;justify-content: space-between;align-items: center;padding: 10px;border-bottom: 1px solid #1e3a5f;background: rgba(10, 22, 40, 0.9);}
.panel-header h4 {width:60%;margin: 0;color: #00d4ff;font-family: 'JetBrains Mono', 'Consolas', monospace;text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);}
.panel-content {padding: 10px;color: #e8f4f8;}
.panel-content h4 {color: #00d4ff;font-family: 'JetBrains Mono', 'Consolas', monospace;text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);}

/* Section Headers */
.section-header{font-weight:bold;margin:10px 0;padding-bottom:8px;
                border-bottom:2px solid var(--accent);color:var(--accent);font-size:16px;font-family:var(--font-tech);}

/* Form Elements */
.form-input{width:100%;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:rgba(16,32,50,0.8);color:var(--text);font-size:14px;box-sizing:border-box;transition:border-color 0.3s,box-shadow 0.3s;}

.form-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 10px rgba(79,195,247,0.3);}

.form-input::placeholder{color:var(--text-dim);}

.form-label{display:block;margin-bottom:6px;color:var(--text);font-weight:500;font-size:13px;}

.form-group{margin-bottom:15px;}

/* Color Controls */
.color-control{margin:15px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.color-control label{display:inline-block;min-width:120px;font-size:13px;color:var(--text);font-weight:500;margin-bottom:0;}
.color-control input[type="color"]{width:40px;height:32px;border:1px solid var(--border);cursor:pointer;border-radius:4px;background:rgba(10,22,40,0.9);}
.color-control input[type="text"]{width:80px;height:32px;padding:6px 8px;font-family:monospace;font-size:12px;border:1px solid var(--border);border-radius:4px;background:rgba(10,22,40,0.9);color:var(--text);box-sizing:border-box;}
.color-control input[type="range"]{width:120px;margin-right:10px;height:32px;}
.color-control select{flex:1;min-width:100px;height:32px;padding:6px 10px;border:1px solid var(--border);border-radius:4px;background:rgba(10,22,40,0.9);color:var(--text);font-size:12px;box-sizing:border-box;}

.current-value{font-size:12px;color:var(--text-dim);min-width:40px;text-align:center;font-weight:bold;}

/* Grid Layouts */
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:30px;}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.grid-1{display:grid;grid-template-columns:1fr;gap:15px;}

/* Flex Layouts */
.flex{display:flex;}
.flex-col{flex-direction:column;}
.flex-wrap{flex-wrap:wrap;}
.flex-center{align-items:center;justify-content:center;}
.flex-between{justify-content:space-between;}
.flex-gap-sm{gap:8px;}
.flex-gap-md{gap:15px;}
.flex-gap-lg{gap:30px;}

/* Notification Styles */
.notification{margin:15px 0;padding:12px 16px;border-radius:6px;font-size:13px;text-align:center;border:1px solid transparent;}
.notification.success{background:rgba(76,175,80,0.2);color:#81c784;border-color:rgba(76,175,80,0.3);}
.notification.error{background:rgba(244,67,54,0.2);color:#e57373;border-color:rgba(244,67,54,0.3);}
.notification.warning{background:rgba(255,193,7,0.2);color:#ffcc02;border-color:rgba(255,193,7,0.3);}
.notification.info{background:rgba(33,150,243,0.2);color:#64b5f6;border-color:rgba(33,150,243,0.3);}

/* ==================== ANDROID-STYLE TOGGLE SWITCHES */
.toggle-control {display: flex;justify-content: space-between;align-items: center;margin-bottom: 2px;}
.toggle-label {font-size: 10px;color: var(--text);font-family: var(--font-tech);text-transform: uppercase;letter-spacing: 0.5px;flex: 1;margin-right: 8px;}
.toggle-switch {width: 40px;height: 20px;background: var(--border);border-radius: 20px;position: relative;cursor: pointer;transition: all 0.3s ease;border: 1px solid var(--border);}
.toggle-switch.active {background: var(--secondary);box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);}
.toggle-slider {width: 16px;height: 16px;background: var(--text);border-radius: 50%;position: absolute;top: 1px;left: 2px;transition: all 0.3s ease;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);}
.toggle-switch.active .toggle-slider {left: 22px;background: var(--primary);}

/* Tooltips */
.tooltip{background:rgba(0,0,0,0.9);color:white;padding:8px 12px;border-radius:6px;font-size:13px;font-family:Arial,sans-serif;pointer-events:none;z-index:1000;position:absolute;white-space:nowrap;border:1px solid #555;box-shadow:0 2px 8px rgba(0,0,0,0.3);line-height:1.4;}

/* Scrollbar Styling */
::-webkit-scrollbar{width:8px;}
::-webkit-scrollbar-track{background:var(--bg);}
::-webkit-scrollbar-thumb{background:var(--secondary);border-radius:4px;}
::-webkit-scrollbar-thumb:hover{background:var(--accent);}

/* Responsive Breakpoints */
@media (max-width:1024px){.grid-3{grid-template-columns:1fr 1fr;}}
@media (max-width:768px){body{font-size:14px;} .grid-3,.grid-2{grid-template-columns:1fr;} .panel{padding:15px;} .color-control{flex-direction:column;align-items:stretch;gap:8px;} .btn-base{padding:6px 10px !important;font-size:9px !important;}}
@media (max-width:480px){.panel{padding:12px;} .btn-icon{width:32px !important;height:32px !important;font-size:14px !important;}}


/* Button Styles */
.btn {
    display: inline-block;
    padding: 8px 16px;margin: 0 4px 4px 0;
    border: 1px solid transparent;border-radius: 4px;
    text-align: center;text-decoration: none;font-size: 14px;font-weight: 500;line-height: 1.5;
    cursor: pointer;transition: all 0.2s ease-in-out;
}

.btn:disabled {opacity: 0.6;cursor: not-allowed;}
.btn-primary {background-color: #007bff;border-color: #007bff;color: #fff;}
.btn-primary:hover:not(:disabled) {background-color: #0056b3;border-color: #004085;}
.btn-secondary {background-color: #6c757d;border-color: #6c757d;color: #fff;}
.btn-secondary:hover:not(:disabled) {
    background-color: #545b62;
    border-color: #4e555b;
}

.btn-outline {
    background-color: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline:hover {
    background-color: #6c757d;
    color: #fff;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    max-width: 500px;
    width: 90%;
    margin: 20px;
}

.modal-dialog.modal-lg {
    max-width: 800px;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-close:hover {
    background-color: #f8f9fa;
}

/* Help Modal Content Styles */
.help-modal-content {
    max-height: 70vh;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 20px;
}

.help-section h4 {
    margin-bottom: 10px;
    color: #495057;
    font-size: 16px;
}

.help-section h3 {
    margin-bottom: 20px;
    color: #212529;
    font-size: 20px;
}

.column-group {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.column-group strong {
    color: #495057;
}

/* Table Styles for Mapping Preview */
.mapping-table {
    width: 100%;
}

.mapping-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.mapping-table th,
.mapping-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.mapping-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

.mapping-table tr.unmapped {
    background-color: #ffeeee;
}

/* Form Input Styles */
.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}


/* ==================== REUSABLE CONTAINER CLASS */
.container {color: var(--text); background: var(--bg-panel); padding: 15px; border-radius: 12px; border: 1px solid var(--border);
            backdrop-filter: blur(15px); box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2); z-index: 100;
            font-size: 11px;color: var(--text);font-family: var(--font-tech);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Text Utilities */
.text-muted {color: #6c757d;}
.text-primary {color: #007bff;}
.text-success {color: #28a745;}
.text-danger {color: #dc3545;}
.text-warning {color: #ffc107;}
.text-center {text-align: center;}
.text-right {text-align: right;}
.text-left {text-align: left;}

/* Display Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }

/* Flexbox Utilities */
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }


.side-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: #ffffff;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.side-panel.open {
    right: 0;
}

.side-panel-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-panel-content {
    padding: 20px;
}

.header-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}