/* BrandBuzz Workflow & Bug Management System CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - HSL tailored premium styles */
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Light Theme Default */
    --bg-app: #f4f6fa;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;
    --border-color: #e2e8f0;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #e0e7ff;
    
    /* Statuses */
    --status-open: #3b82f6;
    --status-assigned: #8b5cf6;
    --status-in-progress: #f59e0b;
    --status-fixed: #10b981;
    --status-testing: #6366f1;
    --status-failed: #ef4444;
    --status-closed: #64748b;
    
    /* Severities */
    --severity-low: #10b981;
    --severity-medium: #f59e0b;
    --severity-high: #f97316;
    --severity-critical: #ef4444;
    --severity-blocker: #7f1d1d;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme Override */
    --bg-app: #0b0f19;
    --bg-card: #151b2c;
    --bg-sidebar: #090d16;
    --bg-sidebar-hover: #151b2c;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sidebar: #64748b;
    --text-sidebar-active: #38bdf8;
    --border-color: #222c44;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-light: rgba(56, 189, 248, 0.1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Layout system */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    transition: var(--transition);
    border-right: 1px solid var(--border-color);
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar-logo span {
    color: var(--accent);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 1.5rem 0.5rem 0.5rem;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-item a:hover,
.sidebar-item.active a {
    background-color: var(--bg-sidebar-hover);
    color: #ffffff;
}

.sidebar-item.active a span {
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Area Layout */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar {
    height: 60px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    transition: var(--transition);
}

.page-title {
    font-size: 1.15rem;
    color: var(--text-main);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--border-color);
}

/* Dynamic Notification Dropdown Widget */
.notification-widget {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    width: 320px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown.active {
    display: block;
}

.notification-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.notification-list {
    max-height: 250px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
}

.notification-item:hover {
    background-color: var(--bg-app);
}

.notification-item.unread {
    background-color: var(--accent-light);
}

.notification-item-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.notification-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Content Area */
.content-area {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

/* Premium card system */
.grid-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.card-metric {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-info h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-number {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-danger {
    background-color: var(--severity-critical);
    color: #ffffff;
}
.btn-danger:hover {
    filter: brightness(0.9);
}

/* Standard Panel Layout */
.panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1rem;
    color: var(--text-main);
}

/* Tables styling */
.table-wrapper {
    overflow-x: auto;
}

.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.table-compact th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table-compact td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.table-compact tr:hover td {
    background-color: rgba(99, 102, 241, 0.02);
}

/* Kanban Board Layout */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}

.kanban-column {
    flex: 0 0 280px;
    background-color: rgba(99, 102, 241, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 0.75rem;
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.kanban-column-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kanban-column-badge {
    background-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 20px;
    font-weight: 600;
}

.kanban-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 200px;
}

.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition);
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.kanban-card-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.kanban-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

/* Status and Severity Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-low { background-color: rgba(16, 185, 129, 0.1); color: var(--severity-low); }
.badge-medium { background-color: rgba(245, 158, 11, 0.1); color: var(--severity-medium); }
.badge-high { background-color: rgba(249, 115, 22, 0.1); color: var(--severity-high); }
.badge-critical { background-color: rgba(239, 68, 68, 0.1); color: var(--severity-critical); }
.badge-blocker { background-color: rgba(127, 29, 29, 0.2); color: var(--severity-blocker); }

.badge-status {
    background-color: var(--border-color);
    color: var(--text-muted);
}
.badge-status.open { background-color: rgba(59, 130, 246, 0.1); color: var(--status-open); }
.badge-status.in_progress { background-color: rgba(245, 158, 11, 0.1); color: var(--status-in-progress); }
.badge-status.fixed { background-color: rgba(16, 185, 129, 0.1); color: var(--status-fixed); }
.badge-status.testing { background-color: rgba(99, 102, 241, 0.1); color: var(--status-testing); }
.badge-status.failed { background-color: rgba(239, 68, 68, 0.1); color: var(--status-failed); }

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Issue Details Timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -23px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 2px solid var(--bg-card);
}

.timeline-content {
    background-color: rgba(99, 102, 241, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.timeline-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* Chat & Collaboration Feed */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: rgba(99, 102, 241, 0.01);
    margin-bottom: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.chat-message-bubble {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    flex-grow: 1;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

/* Screenshot Canvas & Recording Widgets */
.canvas-wrapper {
    position: relative;
    background-color: #1e1e1e;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    overflow: hidden;
    margin-top: 0.5rem;
}

.canvas-toolbar {
    background-color: #333;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    color: white;
}

.canvas-tool-btn {
    background: transparent;
    border: 1px solid #555;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 4px;
}

.canvas-tool-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
}

.annotation-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    background-color: #1e1e1e;
    cursor: crosshair;
}

/* Voice Recorder Widget */
.voice-recorder-widget {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(99, 102, 241, 0.02);
}

.voice-wave {
    flex-grow: 1;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.voice-bar {
    width: 3px;
    height: 5px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: height 0.1s;
}

.voice-bar.animating {
    animation: wave-bounce 1s infinite alternate;
}

@keyframes wave-bounce {
    0% { height: 5px; }
    100% { height: 28px; }
}

/* Uptime status pulse */
.status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--severity-low);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 1.5s infinite;
}

.status-pulse.down {
    background-color: var(--severity-critical);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Glassmorphism Login Box */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(21, 27, 44, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.75rem;
}

.auth-links a {
    color: var(--accent);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Filter controls */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    background-color: var(--bg-card);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.filter-select {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
}
