/* ZenCustom Theme by Antigravity - V2 Refined */
@import url("/assets/application-33e739e5.css");

/* =========================================
   1. CORE VARIABLES
   ========================================= */
:root {
    --primary-teal: #3fc1c9;
    --dark-teal: #2c888e;
    --header-bg: #3fc1c9;
    --text-color: #2c3e50;
    --bg-color: #f4f5f7;
    --nav-text: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* =========================================
   2. LOGIN PAGE ("Invisible Redmine")
   ========================================= */
body.action-login {
    background: url("/assets/themes/ZenCustom/login-bg-f573eaf1.png") no-repeat center center fixed !important;
    background-size: cover !important;
}

body.action-login #wrapper,
body.action-login #main,
body.action-login #content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.action-login #login-form {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px;
    width: 400px;
    margin: 100px auto;
    position: relative;
    /* For pseudo-elements */
}

/* LOGO ON LOGIN PAGE */
body.action-login #login-form::before {
    content: "";
    display: block;
    width: 200px;
    height: 80px;
    background: url("/assets/themes/ZenCustom/mavits-logo-dark-4685d8da.png") no-repeat center center;
    background-size: contain;
    margin: 0 auto 10px auto;
}

/* WELCOME TEXT ON LOGIN PAGE */
body.action-login #login-form::after {
    content: "Welcome to Mavits Projects.\A Please sign in to access your workspace.";
    white-space: pre-wrap;
    display: block;
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* Move inputs down slightly to accommodate header */
body.action-login #login-form table {
    margin-top: 20px;
    width: 100%;
}

body.action-login #header,
body.action-login #top-menu,
body.action-login #footer {
    display: none !important;
}

body.action-login input[type="text"],
body.action-login input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
}

body.action-login input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--primary-teal);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* =========================================
   3. MODERN HEADER & NAVIGATION
   ========================================= */
/* Top Bar (Projects, Help, My Page) */
#top-menu {
    background-color: var(--dark-teal) !important;
    padding: 8px 15px;
    height: auto;
}

#top-menu ul li a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

#top-menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Header (Project Title & Search) */
#header {
    background-color: var(--header-bg) !important;
    background-image: none !important;
    /* REMOVE GRADIENT */
    padding: 15px 20px 0 20px !important;
    border-bottom: none !important;
    color: #fff;
    min-height: 80px;
    /* Ensure space for tabs */
}

/* LOGO IN HEADER */
#header>h1 {
    background: url("/assets/themes/ZenCustom/mavits-logo-header-c4b41186.png") no-repeat left center !important;
    background-size: contain !important;
    color: transparent !important;
    /* Hide text */
    height: 40px;
    width: 200px;
    margin-top: 5px;
    margin-bottom: 10px;
    text-indent: -9999px;
    /* Ensure text is hidden accessed visually */
    display: block;
}

/* =========================================
   4. FIXED PROJECT TABS (The "Menu" Fix)
   ========================================= */
/* Reset the Main Menu Container */
#main-menu {
    position: relative;
    bottom: 0px;
    /* Align to bottom of header */
    left: 0;
    margin-right: 0;
    margin-top: 15px;
}

/* The Tab Links */
#main-menu ul li a {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 15px !important;
    margin-right: 5px;
    border-radius: 6px 6px 0 0 !important;
    /* Rounded Top */
    text-transform: capitalize;
    transition: all 0.2s ease;
}

/* Hover State */
#main-menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Selected/Active Tab (White Card Look) */
#main-menu ul li a.selected {
    background-color: #f4f5f7 !important;
    /* Matches Body BG */
    color: var(--text-color) !important;
    border-top: 3px solid var(--dark-teal) !important;
    /* Accent Top Border */
}

/* =========================================
   5. FIX: REMOVE LEFT MENU GHOST
   ========================================= */
/* Redmine sometimes renders a responsive 'flyout' menu incorrectly on desktop. Hide it. */
#flyout-menu {
    display: none !important;
}

/* Ensure main content isn't pushed */
#wrapper {
    background-color: transparent !important;
}

/* =========================================
   6. MAIN CONTENT AREA
   ========================================= */
#main {
    background-color: transparent;
    margin: 20px;
}

#content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 25px !important;
    border: 1px solid #e0e0e0;
}

/* Sidebar (Right side, usually) */
#sidebar {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-left: 15px;
}

/* =========================================
   7. PLUGIN OVERRIDES
   ========================================= */
/* Agile Board Cards */
.issue-card {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 10px;
    transition: transform 0.2s;
}

.issue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Primary Buttons */
a.icon-add,
input[type="submit"] {
    background: var(--primary-teal) !important;
    color: #fff !important;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================================
   8. DASHBOARD STYLES (HOME PAGE)
   ========================================= */
/* Hero Section */
.zen-dashboard {
    padding: 0;
}

.zen-hero {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--dark-teal) 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(44, 136, 142, 0.2);
}

.zen-hero h2 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 28px;
}

.zen-hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.zen-btn-primary {
    background: #fff;
    color: var(--dark-teal);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: transform 0.2s;
    display: inline-block;
}

.zen-btn-primary:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--primary-teal);
}

/* Stats Grid */
.zen-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    border-color: var(--primary-teal);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f7f7;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--dark-teal);
}

/* Icons Mock */
.icon-tasks::before {
    content: "📋";
}

.icon-reported::before {
    content: "📢";
}

.icon-calendar::before {
    content: "📅";
}

.icon-projects::before {
    content: "📂";
}

.icon-key::before {
    content: "🔑";
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

.stat-meta {
    font-size: 12px;
    color: #888;
}

/* Split Layout */
.zen-layout-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.zen-section h3 {
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 18px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-link {
    font-size: 13px;
    color: var(--primary-teal);
    font-weight: 600;
}

/* Project List */
.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #f0f0f0;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.project-item:hover {
    background: #fafafa;
}

.project-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.project-info h4 a {
    color: var(--text-color);
}

.project-info p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.btn-icon {
    color: #ccc;
    font-size: 18px;
}

.project-item:hover .btn-icon {
    color: var(--primary-teal);
}

/* News Feed */
.news-item {
    display: flex;
    margin-bottom: 20px;
}

.news-date {
    text-align: center;
    margin-right: 15px;
    min-width: 50px;
}

.news-date .day {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--dark-teal);
}

.news-date .month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
}

.news-content h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.news-meta {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 8px;
}
/* =========================================
   FIXES: Header Alignment & Login Centering
   ========================================= */

/* Header Search Vertical Alignment */
#quick-search {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 15px !important;
    margin-top: 0 !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    height: auto !important;
}

#quick-search form {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

#quick-search input#q {
    margin: 0 5px 0 0 !important;
    height: 28px !important; /* Force a consistent height */
}

#quick-search select {
    margin: 0 !important;
    height: 28px !important;
}

/* Login Page Centering (Flexbox) - Ensure this is applied to ZenCustom */
body.action-login #main {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    background: url("/assets/themes/ZenCustom/login-bg-f573eaf1.png") no-repeat center center fixed !important;
    background-size: cover !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.action-login #content {
    background: rgba(255,255,255,0.95) !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    width: 400px !important;
    max-width: 90% !important;
    margin: auto !important; /* Ensure generic centering */
}
/* Remove Outer Card Styling */
body.action-login #content {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    /* Remove padding to let inner card stand alone */
    /* Maintain centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    /* Ensure full height for vertical centering */
}

/* Ensure Inner Card Styling is preserved and sufficient */
#login-form {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    width: 400px !important;
    max-width: 90vw !important;
    /* Use vw for viewport width responsiveness */
    margin: 0 !important;
    /* Reset margin as centering is handled by parent flex */
}/* Remove Outer Card Styling - High Specificity Force */
html body.action-login div#content {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    width: auto !important;
    max-width: none !important;
}

/* Ensure Inner Card Styling */
html body.action-login #content #login-form {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    width: 400px !important;
    max-width: 90vw !important;
    margin: 0 !important;
}