/*******************************************************************************/
/*********          Company:     Shanghai Jruner Technology Co., Ltd.            *********/
/*********          Product:     Jruner Digital Platform(JDP)          *********/
/*********          Created By:  Fan Xiaolei(Raymond)                  *********/
/*********          Created On:  2016-10-11                            *********/
/*********          Modified By: Fan Xiaolei(Raymond)                  *********/
/*********          Modified On:  2020-03-01                           *********/
/*******************************************************************************/
/* Instruction */
/* General Styles */
/*******************************************************************************/

/* ============================
   CSS Variables
   ============================ */
:root {
    /* Primary Colors - 深蓝向蓝色渐变 */
    --primary-color: #2563eb;
    --primary-color-start: #062b92;
    --primary-color-end: #5566fa;
    --primary-gradient: linear-gradient(to right, var(--primary-color-start), var(--primary-color-end));
    --primary-hover-start: #43afee;
    --primary-hover-end: #609fec;
    --primary-hover-gradient: linear-gradient(to right, var(--primary-hover-start), var(--primary-hover-end));
    --primary-hover: #65a2f1;
    --primary-light: #dbeafe;

    /* Secondary Colors */
    --secondary-color: #56a965;
    --secondary-hover: #40916c;
    --accent-color: #e3d839;

    /* Status Colors */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    --success-gradient: linear-gradient(to right, #10b981, #34d399);

    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    --warning-gradient: linear-gradient(to right, #f59e0b, #fbbf24);

    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;
    --danger-hover-color: #f87171;
    --danger-gradient: linear-gradient(to right, #ef4444, #f87171);

    --error-color: #ef4444;

    /* Neutral Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #ffffff;

    /* Background Colors */
    --background: #ffffff;
    --background-secondary: #f5f7fa;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-tertiary: #e8ecf1;
    --bg-dark: #81a2c2;

    /* Border Colors */
    --border-color: #e0e6ed;
    --border-light: #f0f3f7;
    --border-focus: #4b7fbb;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Layout */
    --header-height: 64px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 64px;
    --footer-height: 48px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ============================
   Global Reset and Base Styles
   ============================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================
   Animation Effects
   ============================ */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ============================
   Layout Utilities
   ============================ */

/* Flexbox Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

/* Flex Children */
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* ============================
   Spacing Utilities
   ============================ */

/* Margin */
.m-0 { margin: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-1 { margin-top: 4px; }
.mt-6 { margin-top: 24px; }
.ml-2 { margin-left: 8px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 16px; }

/* Padding */
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.pt-12 { padding-top: 48px; }
.pb-12 { padding-bottom: 48px; }
.pl-10 { padding-left: 40px; }
.pr-4 { padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }

/* ============================
   Text Utilities
   ============================ */

/* Text Colors */
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ============================
   Background Utilities
   ============================ */
.bg-white { background-color: var(--bg-primary); }
.bg-gray-50 { background-color: var(--bg-secondary); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--primary-color-start), var(--primary-color-end)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--primary-color-start), var(--primary-color-end)); }

/* ============================
   Border and Border Radius Utilities
   ============================ */

/* Borders */
.border { border: 1px solid var(--border-color); }

/* Border Radius */
.rounded { border-radius: 4px; }
.rounded-full { border-radius: 50%; }
.rounded-lg { border-radius: 12px; }
.rounded-md { border-radius: 8px; }

/* ============================
   Shadow Utilities
   ============================ */
.shadow { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15); }

/* ============================
   Position Utilities
   ============================ */

/* Positioning */
.fixed { position: fixed; }
.absolute { position: absolute; }
.sticky { position: sticky; }

/* Position Offsets */
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.left-0 { left: 0; }
.left-1\/2 { left: 50%; }
.right-0 { right: 0; }

/* Z-index */
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* ============================
   Width and Height Utilities
   ============================ */

/* Width */
.w-full { width: 100%; }
.w-10 { width: 40px; }
.w-8 { width: 32px; }

/* Height */
.h-full { height: 100%; }
.h-10 { height: 40px; }
.h-8 { height: 32px; }

/* ============================
   Overflow Utilities
   ============================ */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }

/* ============================
   Transition Utilities
   ============================ */
.transition { transition: all 0.3s ease; }
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-opacity { transition: opacity 0.3s ease; }

/* ============================
   Transform Utilities
   ============================ */
.transform { transform: translateZ(0); }
.translate-y-1\/2 { transform: translateY(50%); }
.translate-x-1\/2 { transform: translateX(50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.-translate-x-1\/2 { transform: translateX(-50%); }

/* ============================
   Cursor Utilities
   ============================ */
.cursor-pointer { cursor: pointer; }

/* ============================
   Pointer Events Utilities
   ============================ */
.pointer-events-none { pointer-events: none; }

/* ============================
   Scrollbar Styles
   ============================ */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ============================
   Button Styles
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--primary-hover-gradient);
}

.btn-primary:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-hover);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ============================
   Header Styles
   ============================ */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    gap: 1rem;
}

.title-section {
    display: flex;
    align-items: center;
    padding-left: 10px; /*Raymond: right page header-icon position */
    gap: 1rem;
    flex: 1;
}

.page-icon {
    width: 37px;
    height: 37px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-icon .material-icons-round {
    font-size: 1.14rem;
    color: #2563eb;
}

.page-title h1 {
    font-size: 1.06rem;
    font-weight: 600;
    margin: 20px 0px 2px 10px; /*Raymond: right page header: up right bottom left */
    line-height: 1.2;
}

.page-title .page-subtitle {
    font-size: 0.53rem;
    opacity: 0.9;
    margin-top: 0.15rem;
    font-weight: 400;
}

.action-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ============================
   State Classes
   ============================ */

.is-active {
    color: var(--primary-color, #2563eb);
    background-color: var(--primary-light, #dbeafe);
}

.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================
   Status Badge Styles
   ============================ */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.status-draft {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-secondary);
}

.status-completed {
    background: var(--success-light);
    color: var(--success-dark);
}

.status-in-progress {
    background: var(--primary-light);
    color: var(--primary-color);
}

.status-cancelled {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.status-new {
    background: var(--primary-light);
    color: var(--primary-color-start);
}

.status-progress {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.status-delay {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.status-complete {
    background: var(--success-light);
    color: var(--success-dark);
}

/* ============================
   Permission Badge Styles
   ============================ */
.permission-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.permission-badge .material-icons-round {
    font-size: 16px;
}

.permission-on {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-dark);
}

.permission-off {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-dark);
}

/* ============================
   Priority Styles
   ============================ */
.priority-high {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.priority-medium {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.priority-low {
    background: var(--primary-light);
    color: var(--primary-color-start);
}

/* ============================
   Toast Notifications
   ============================ */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--danger-color);
}

/* ============================
   Section Styles
   ============================ */
.section {
    margin-bottom: 2.5rem;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon .material-icons {
    font-size: 18px;
    color: var(--primary-color);
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* ============================
   Image Styles
   ============================ */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* ============================
   Link Styles
   ============================ */
a:link {
    color: default;
    text-decoration: none;
}

a:visited {
    color: var(--text-muted);
    text-decoration: none;
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

a:active {
    color: default;
    text-decoration: none;
}

/* ============================
   Main Container Styles
   ============================ */
.fbox {
    width: 100%;
    margin: 0px;
    padding: 0px;
    background: auto;
}

.fbox img {
    max-width: 100% !important;
    height: auto !important;
}

/* ============================
   Additional Animation Effects
   ============================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ============================
   Additional Utilities
   ============================ */
.hidden {
    display: none;
}

/* ============================
   User Welcome Page Styles
   ============================ */

/* ============================
   Title Highlight Styles (通用标题高亮样式)
   ============================ */
/* 渐变文字样式 - 适用于标题高亮显示 */
.title-highlight,
.login-title-highlight {
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-image: linear-gradient(to right, #0a1f5c, var(--primary-color-start), var(--primary-color-end), #00ffff) !important;
}

.loginplatform {
    padding: 8px 24px;
    background: linear-gradient(to right, #2563eb, #3b82f6, #06b6d4);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.loginplatform:hover {
    background: linear-gradient(to right, #3772f3, #5a96f7, #48dbf5);
    color: #303336;
}

.loginplatform:visited {
    background: linear-gradient(to right, #6c97f3, #80abf1, #5fd6eb);
    color: #e2dbf7;
}


