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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo svg {
    color: white;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    letter-spacing: -0.5px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
}

.navbar-menu li {
    margin: 0;
}

.navbar-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #4361EE;
    color: white;
}

.btn-primary:hover {
    background-color: #12086F;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    margin: -20px -20px 20px -20px;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.card-title {
    margin: 0;
    color: #2c3e50;
}

.auth-layout {
    max-width: 1000px;
    margin: 40px auto;
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.auth-welcome {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-card img {
    height: 48px;
    width: auto;
}

.brand-text h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.brand-text p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.welcome-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.welcome-text p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-card-wrapper {
    flex: 0 0 auto;
    min-width: 320px;
    max-width: 400px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

/* Keep auth-container for backward compatibility but not used on login page */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
}

.dashboard-content {
    margin-top: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 24px 0;
}

.header-content h2 {
    color: #2c3e50;
    margin: 0 0 4px 0;
    font-size: 2rem;
    font-weight: 600;
}

.header-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.project-title h2 {
    color: #2c3e50;
    margin: 0 0 4px 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.project-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.project-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #3498db;
}

.project-card-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.project-card-description {
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 15px;
}

.project-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #95a5a6;
}

.project-view {
    animation: fadeIn 0.3s ease-in;
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.project-header h2 {
    color: #2c3e50;
    margin: 0;
}

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #3498db;
    color: white;
}

.issue-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.issue-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    cursor: pointer;
    transition: transform 0.2s;
}

.issue-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.issue-badges {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}


.issue-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.issue-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Status = workflow stage: open=blue (active), in_progress=amber,
   resolved=green (done), closed=neutral gray (archived) */
.status-open {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-in_progress {
    background-color: #fef3c7;
    color: #92400e;
}

.status-resolved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-closed {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* Priority = urgency: it owns the "heat" colors (gray -> blue -> orange -> red) */
.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #f8f9fa;
}

.priority-low {
    background-color: #f1f5f9;
    color: #64748b;
}

.priority-medium {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.priority-high {
    background-color: #ffedd5;
    color: #c2410c;
}

.priority-critical {
    background-color: #dc2626;
    color: #ffffff;
}

/* Type = neutral category label; the icon carries the meaning, not color */
.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 5px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.parent-reference {
    color: #7f8c8d;
    font-style: italic;
    margin-left: 10px;
}

.child-issues-preview {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

.child-issue-tag {
    display: inline-block;
    background-color: #ecf0f1;
    color: #2c3e50;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid #bdc3c7;
}

.more-children {
    color: #7f8c8d;
    font-style: italic;
    margin-left: 5px;
}

/* Left border follows the priority heat ramp so urgent issues stand out in the list */
.issue-priority-low {
    border-left-color: #cbd5e1;
}

.issue-priority-medium {
    border-left-color: #3b82f6;
}

.issue-priority-high {
    border-left-color: #f59e0b;
}

.issue-priority-critical {
    border-left-color: #ef4444;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.text-muted {
    color: #6c757d;
}

/* Enhanced Modal Styles */
.issue-detail-container {
    max-width: none;
}

.issue-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.issue-badges-row {
    display: flex;
    gap: 10px;
}

.issue-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.meta-column > div {
    margin-bottom: 8px;
}

.description-section {
    margin-bottom: 25px;
}

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

.description-display {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    min-height: 60px;
    line-height: 1.5;
}

.description-edit textarea {
    min-height: 120px;
}

.child-issues-section {
    margin-bottom: 25px;
}

.child-issues-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.child-issue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.child-issue-item:hover {
    background-color: #e9ecef;
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #495057;
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.add-comment-section, .add-attachment-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.comment-item {
    border-bottom: 1px solid #dee2e6;
    padding: 15px 0;
}

.comment-item:last-child {
    border-bottom: none;
}

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

.comment-date {
    font-size: 0.875rem;
    color: #6c757d;
}

.comment-content {
    line-height: 1.5;
    color: #495057;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

.attachment-item:last-child {
    border-bottom: none;
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attachment-name {
    font-weight: 500;
}

.file-icon {
    font-size: 1.25rem;
}

.no-data, .error {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.error {
    color: #dc3545;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* ----- Empty states ----- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state .empty-icon {
    width: 64px;
    height: 64px;
    padding: 16px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-state p {
    color: #6c757d;
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    max-width: 320px;
}

/* ----- Loading skeletons ----- */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 0.875rem;
    margin-bottom: 8px;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.long  { width: 100%; }
.skeleton-title { height: 1.25rem; width: 60%; margin-bottom: 12px; }

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.skeleton-line {
    height: 1rem;
    margin-bottom: 10px;
}

.skeleton-project {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skeleton-issue {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ----- Role chip (navbar + settings) ----- */
.role-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.role-chip.admin {
    background: #e8f4ff;
    color: #0066cc;
}

.role-chip.manager {
    background: #fff4e5;
    color: #b45309;
}

.role-chip.user {
    background: #f0f9f0;
    color: #2d8f2d;
}

.edit-form {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 20px;
    border-radius: 8px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header-left h2 {
    margin: 0;
}

/* Issue modal: keep header/title visible while body scrolls */
#issueModal .modal-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#issueModal .modal-header {
    flex-shrink: 0;
}

#issueModal #modalBody {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#issueModal .issue-detail-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#issueModal .issue-detail-header {
    flex-shrink: 0;
}

#issueModal .issue-detail-scrollable {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    overscroll-behavior: contain;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.comments-section {
    margin-top: 20px;
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.comment {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
}

.comment-header {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.comment-content {
    line-height: 1.5;
}

.attachments-section {
    margin-top: 20px;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 1.2rem;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filters-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.filter-group {
    flex: 1;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    position: relative;
}

#alert-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

#alert-container .alert {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Distinct hue per metric so cards are scannable at a glance */
.stat-total    { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.stat-open     { background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%); }
.stat-mine     { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.stat-projects { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }

.stat-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.stat-icon .icon {
    width: 32px;
    height: 32px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Distinct hue per metric so cards are scannable at a glance */
.stat-total    { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.stat-open     { background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%); }
.stat-mine     { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.stat-projects { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }

.stat-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.stat-icon .icon {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Settings Page Styles */
.settings-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.settings-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.settings-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.settings-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.settings-section {
    padding: 30px;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

.settings-header-actions h3 {
    margin-bottom: 0;
}

.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.users-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.users-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.users-table tbody tr:hover {
    background-color: #f8f9fa;
}

.users-table .loading,
.users-table .no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.role-admin {
    background-color: #e8f4ff;
    color: #0066cc;
}

.role-user {
    background-color: #f0f9f0;
    color: #2d8f2d;
}

.users-table .actions {
    white-space: nowrap;
}

.users-table .btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    margin-right: 8px;
}

.text-muted {
    color: #6c757d !important;
}

.text-warning {
    color: #856404;
    background-color: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

/* Settings Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.modal-close:hover {
    color: #000;
}

/* Settings Alert Styles */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    position: relative;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Settings Responsive Design */
@media (max-width: 768px) {
    .users-table {
        font-size: 0.875rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }
    
    .users-table .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
        margin: 2px;
        display: block;
    }
    
    .users-table .actions {
        white-space: normal;
    }
    
    .settings-section {
        padding: 20px;
    }
}

/* Share Link Styling */
.share-link {
    display: inline-block;
    margin-left: 8px;
    text-decoration: none;
    opacity: 0.6;
    transition: all 0.2s ease;
    font-size: 0.9em;
    cursor: pointer;
    position: relative;
}

.share-link:hover {
    opacity: 1;
    transform: scale(1.1);
    text-decoration: none;
}

.share-link:hover::after {
    content: 'Copy link';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    white-space: nowrap;
    z-index: 1000;
}

.child-share {
    margin-left: 4px;
    font-size: 0.8em;
}

.child-issue-tag .share-link {
    margin-left: 4px;
    font-size: 0.75em;
}

/* Prevent share links from triggering parent click events */
.share-link:active {
    transform: scale(0.95);
}

/* Landing Page Styles */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

.features {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.pricing {
    padding: 80px 0;
    background-color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border-color: #667eea;
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.pricing-price .currency {
    font-size: 1.2rem;
    color: #6c757d;
}

.pricing-price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
}

.pricing-price .period {
    font-size: 1rem;
    color: #6c757d;
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    color: #495057;
    position: relative;
    padding-left: 25px;
}

.pricing-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-action {
    text-align: center;
}

.pricing-action .btn-outline {
    color: #667eea;
    border: 2px solid #667eea;
    background: transparent;
}

.pricing-action .btn-outline:hover {
    background: #667eea;
    color: white;
}

.pricing-action .btn {
    width: 100%;
    padding: 12px 20px;
    font-weight: 600;
}

.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-content h1.hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions,
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn,
    .cta-actions .btn {
        min-width: 200px;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

/* ============================================================
   Inline SVG icon alignment (Lucide via /js/icons.js)
   ============================================================ */
.icon {
    vertical-align: -2px;
}

/* Buttons and tabs: icon sits before the label */
.btn .icon,
.tab-btn .icon {
    margin-right: 6px;
}

/* Type icons in issue titles / modal titles: neutral slate */
.issue-title .icon,
#modalTitle .icon {
    color: #64748b;
    vertical-align: -2px;
    margin-right: 4px;
}

/* Child issue tags */
.child-issue-tag .icon {
    vertical-align: -2px;
}

/* Share links: muted, icon-only */
.share-link {
    color: #94a3b8;
    vertical-align: middle;
}

.share-link:hover {
    color: #475569;
}

/* Attachment file icons */
.file-icon {
    color: #64748b;
    display: inline-flex;
    align-items: center;
}

/* Settings page heading */
.settings-header h2 .icon {
    vertical-align: -3px;
    margin-right: 6px;
    color: #2c3e50;
}

/* Landing page feature icons */
.feature-icon {
    color: #667eea;
}

.feature-icon .icon {
    display: block;
    margin: 0 auto;
}

/* Billing plan feature list icons */
.plan-features .icon {
    vertical-align: -2px;
    margin-right: 6px;
    color: #27ae60;
}

.plan-features .icon-x {
    color: #dc3545;
}

/* ============================================================
   Pagination (issue list)
   ============================================================ */
#issuesPagination {
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled):not(.active) {
    border-color: #4361EE;
    color: #4361EE;
}

.page-btn.active {
    background: #4361EE;
    border-color: #4361EE;
    color: white;
    cursor: default;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #6c757d;
    padding: 0 2px;
}

/* ============================================================
   Filter chips (active filters below the filter controls)
   ============================================================ */
.filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.chip-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #e2e8f0;
    color: #334155;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.chip-remove {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 2px;
    border-radius: 4px;
}

.chip-remove:hover {
    background: #cbd5e1;
    color: #dc2626;
}

/* Remove margins from filter groups so chips sit flush under the row */
.filters .filter-group {
    margin-bottom: 0;
}