/* assets/css/style.css - UPDATED */
:root {
    --primary-color: #007cba;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --green-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --blue-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}
body>main {
    padding-top: 74px !important;
}
/* Main Color  */
.bg-blue-600 {
    background: black !important;
}

.text-blue-700 {
    color: black !important;
}

.border-blue-200 {
    border-color: #00000050 !important;
}

.bg-blue-50 {
    background: #00000010 !important;
}

.text-blue-600 {
    color: black !important;
}

.bg-blue-100 {
    background: #00000010 !important;
}

.text-blue-500 {
    color: black !important;
}


.hover\:bg-blue-700:hover {
    background: black !important;
}
.bg-black {
    background: black !important;
}
/* Header & Navigation */
.main-logo {
    width: 30px;
    padding-block: 10px;
}
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #005a87 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #005a87 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    font-size: 2.5rem;
}

/* Stats Grid - UPDATED */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    transform: rotate(45deg) translate(30px, -30px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-success { background: var(--success-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-warning { background: var(--warning-color); color: #212529; }
.btn-info { background: var(--info-color); color: white; }
.btn-secondary { background: var(--secondary-color); color: white; }
.btn-purple { background: #8b5cf6; color: white; }
.btn-purple:hover { background: #7c3aed; }

.btn-sm { padding: 0.5rem 1rem; font-size: 12px; }

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new { background: #e3f2fd; color: #1565c0; }
.status-in-process { background: #fff3e0; color: #ef6c00; }
.status-pending-qa { background: #f3e5f5; color: #7b1fa2; }
.status-rejected { background: #ffebee; color: #c62828; }
.status-completed { background: #e8f5e8; color: #2e7d32; }
.status-active { background: #e8f5e8; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-on-hold { background: #e2e3e5; color: #383d41; }
.status-on-track { background: #d1fae5; color: #065f46; }
.status-behind { background: #fef3c7; color: #92400e; }
.status-at-risk { background: #fee2e2; color: #991b1b; }
.status-achieved { background: #dbeafe; color: #1e40af; }

/* Priority Styles */
.priority-high { color: var(--danger-color); font-weight: bold; }
.priority-medium { color: var(--warning-color); font-weight: bold; }
.priority-low { color: var(--success-color); font-weight: bold; }

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* SALES SPECIFIC STYLES */

/* Target Revenue Card */
.target-revenue-card {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 1px solid #d8b4fe;
    position: relative;
    overflow: hidden;
}

.target-revenue-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, transparent 40%, rgba(168, 85, 247, 0.1) 50%, transparent 60%);
    transform: rotate(45deg) translate(30px, -30px);
}

/* Achieved Revenue Card */
.achieved-revenue-card {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
}

.achieved-revenue-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, transparent 40%, rgba(34, 197, 94, 0.1) 50%, transparent 60%);
    transform: rotate(45deg) translate(20px, -20px);
}

/* Agent Cards */
.agent-target-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #f5f3ff 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.agent-target-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6;
}

.agent-achieved-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    transition: all 0.3s ease;
}

.agent-achieved-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.15);
}

/* Quick Stats Summary */
.quick-stats-summary {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
}

/* Status indicator pulse animation */
@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.status-indicator.active {
    animation: statusPulse 2s infinite;
}

/* Sales Rankings Sidebar */
.rankings-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-left: 1px solid #e2e8f0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
}

.rank-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rank-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.rank-2 {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.rank-3 {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { width: 0; }
    to { width: var(--progress-width); }
}

.progress-bar {
    animation: progressFill 1s ease-out forwards;
}

.progress-bar-animated {
    animation: progressFill 1.5s ease-out forwards;
}

/* Scrollbar for rankings */
.rankings-scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.rankings-scroll::-webkit-scrollbar {
    width: 6px;
}

.rankings-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.rankings-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.rankings-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Achievement percentage colors */
.achievement-100 { color: #059669; }
.achievement-80 { color: #d97706; }
.achievement-50 { color: #ea580c; }
.achievement-below { color: #dc2626; }

/* Notices */
.notice {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.notice-success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.notice-error {
    background: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

/* Rich Text Editor */
.rich-text-editor {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
}

.editor-toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #d1d5db;
    padding: 0.5rem;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 0.25rem;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.editor-content {
    min-height: 120px;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: white;
}

.editor-content:focus {
    outline: none;
}

.editor-content ul, .editor-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.editor-content ul {
    list-style-type: disc;
}

.editor-content ol {
    list-style-type: decimal;
}

.editor-content a {
    color: #2563eb;
    text-decoration: underline;
}

.editor-content a:hover {
    color: #1d4ed8;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

/* Custom scrollbar */
.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.overflow-y-auto::-webkit-scrollbar {
    width: 4px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth transitions */
.transition {
    transition: all 0.2s ease-in-out;
}

/* Utility classes */
.hidden {
    display: none !important;
}
/* 12-Month Grid Styles */
.month-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.month-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.month-card.current-month {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.month-card.past-month {
    opacity: 0.9;
}

.month-card.future-month {
    opacity: 0.8;
}

/* Achievement color classes */
.achievement-excellent { 
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
}

.achievement-good { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.achievement-fair { 
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    border-color: #f97316;
}

.achievement-poor { 
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
}

/* Targets list scrollbar */
.targets-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.targets-list::-webkit-scrollbar {
    width: 4px;
}

.targets-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.targets-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.targets-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Year selector */
.year-selector {
    min-width: 120px;
}
/* Announcement Modal Styles */
#announcementModal {
    z-index: 9999;
}

#announcementModal .modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Dynamic Announcement Modal */
#dynamicAnnouncementModal {
    animation: modalFadeIn 0.3s ease-out;
}

#dynamicAnnouncementModal .modal-content {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Show as modal button */
.show-as-modal-btn {
    transition: all 0.2s ease;
}

.show-as-modal-btn:hover {
    transform: scale(1.1);
}

/* Image preview in forms */
#imagePreview img {
    transition: transform 0.2s ease;
}

#imagePreview img:hover {
    transform: scale(1.05);
}

/* File upload area */
.border-dashed:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

/* Announcement card with image */
.announcement-card.with-image {
    position: relative;
}

.announcement-card.with-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}
/* Announcement Cards */
.announcement-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Type Badges */
.announcement-badge-off {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.announcement-badge-celebration {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.announcement-badge-activity {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.announcement-badge-general {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}
/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}
body.role-team_member a[title="Projects"] {
    display: none;
}
body.role-team_member a.edit-button {
    display: none;
}
body.role-team_member div:has(>select[name="sow_filter"]) {
    display: none;
}
#messagesContainer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    scroll-behavior: smooth;
}

/* Messages should appear in order */
.message {
    order: 0;
}

/* Ensure newest messages are at the bottom */
#messagesContainer > *:last-child {
    margin-bottom: 0;
}
/* File links dropdown animation */
#fileLinksDropdown {
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform-origin: bottom right;
}

#fileLinksDropdown:not(.hidden) {
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* File sharing links hover effect */
#fileLinksDropdown a {
    transition: all 0.2s ease;
}

#fileLinksDropdown a:hover {
    transform: translateX(2px);
}
/* Responsive Styles */
@media (max-width: 1280px) {
    .rankings-sidebar {
        width: 320px;
    }
    
    .agent-card .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .rankings-sidebar {
        display: none;
    }
    
    .monthly-stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .month-grid {
        grid-template-columns: 1fr;
    }
    
    .year-selector {
        width: 100%;
        margin-bottom: 1rem;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .monthly-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .agent-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Flex container for main layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
}