/**
 * Developer Panel Widget Styles
 * Provides a floating action button and slide-in panel for project management
 */

/* ============================================================================
   CSS Variables
   ============================================================================ */

:root {
    --teal: #14b8a6;
    --teal-dark: #0f766e;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --blue: #3b82f6;
    --pink: #ec4899;
    --yellow: #eab308;
    --purple: #a855f7;
    --green: #10b981;
    --orange: #f97316;
    --red: #dc2626;
}

/* ============================================================================
   Floating Action Button (FAB)
   ============================================================================ */

.dev-panel-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gray-900);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown via JS when user has permission */
    align-items: center;
    justify-content: center;
}

.dev-panel-fab:hover {
    transform: scale(1.05);
    background: var(--gray-800);
}

.dev-panel-fab:active {
    transform: scale(0.95);
}

/* ============================================================================
   Panel Container
   ============================================================================ */

.dev-panel-container {
    position: fixed;
    top: 0;
    right: -520px;
    width: 500px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--gray-200);
}

.dev-panel-container.open {
    right: 0;
}

/* ============================================================================
   Panel Header - Dark theme matching wireframe
   ============================================================================ */

.dev-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gray-900);
    color: white;
    border-bottom: 1px solid var(--gray-700);
    flex-shrink: 0;
}

.dev-panel-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-panel-location {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--gray-400);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.icon-btn:hover {
    color: white;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--gray-400);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: white;
}

/* ============================================================================
   Status Card - Matches wireframe dev-status design
   ============================================================================ */

.dev-status {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 16px;
    margin-bottom: 20px;
}

.dev-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.phase-indicator {
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 600;
}

/* ============================================================================
   Phase Tracker Mini - Matches wireframe design
   ============================================================================ */

.phase-tracker-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
}

.phase-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.phase-mini-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.phase-mini-circle.complete {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.phase-mini-circle.complete::after {
    content: '✓';
    font-size: 14px;
}

.phase-mini-circle.current {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.phase-mini-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--gray-500);
    text-align: center;
}

.phase-mini.complete .phase-mini-label,
.phase-mini.current .phase-mini-label {
    color: var(--teal);
}

.phase-mini-connector {
    width: 30px;
    height: 2px;
    background: var(--gray-300);
    margin-bottom: 18px;
}

.phase-mini-connector.complete {
    background: var(--teal);
}

/* Legacy phase tracker support */
.general-workflow {
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.workflow-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-600);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.phase-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.phase-bubble {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.phase-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: white;
    color: var(--gray-400);
    border: 2px solid var(--gray-300);
    transition: all 0.3s ease;
}

.phase-bubble.active .phase-circle {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
}

.phase-bubble.active .phase-circle::after {
    content: '✓';
    font-size: 14px;
}

.phase-bubble.current .phase-circle {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.phase-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--gray-500);
}

.phase-bubble.active .phase-label,
.phase-bubble.current .phase-label {
    color: var(--teal);
}

.phase-connector {
    width: 30px;
    height: 2px;
    background: var(--gray-300);
    margin-top: -18px;
}

.phase-connector.complete {
    background: var(--teal);
}

/* ============================================================================
   Panel Content Area
   ============================================================================ */

.dev-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
}

.dev-panel-content::-webkit-scrollbar {
    width: 6px;
}

.dev-panel-content::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.dev-panel-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 0;
}

.dev-panel-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================================================
   Loading Spinner
   ============================================================================ */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6b7280;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   Collapsible Section - Matches wireframe design
   ============================================================================ */

.dev-section {
    margin-bottom: 16px;
}

.dev-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--gray-100);
    cursor: pointer;
    transition: background 0.2s;
}

.dev-section-header:hover {
    background: var(--gray-200);
}

.section-icon {
    font-size: 12px;
    color: var(--gray-600);
    transition: transform 0.2s;
}

.dev-section-header.collapsed .section-icon {
    transform: rotate(-90deg);
}

.dev-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-900);
    flex: 1;
}

.dev-section-count {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
}

.dev-section-content {
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.dev-section-header.collapsed + .dev-section-content {
    max-height: 0;
    padding: 0 12px;
}

/* ============================================================================
   Category Filters - Matches wireframe design
   ============================================================================ */

.category-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.category-filter.planning {
    border-color: var(--blue);
    color: var(--blue);
}

.category-filter.planning.active {
    background: var(--blue);
    color: white;
}

.category-filter.design {
    border-color: var(--pink);
    color: var(--pink);
}

.category-filter.design.active {
    background: var(--pink);
    color: white;
}

.category-filter.technical {
    border-color: var(--yellow);
    color: var(--yellow);
}

.category-filter.technical.active {
    background: var(--yellow);
    color: white;
}

.category-filter.reference {
    border-color: var(--purple);
    color: var(--purple);
}

.category-filter.reference.active {
    background: var(--purple);
    color: white;
}

/* Category Badges */
.category-badge {
    padding: 2px 6px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 0;
}

.category-badge.planning {
    background: var(--blue);
    color: white;
}

.category-badge.design {
    background: var(--pink);
    color: white;
}

.category-badge.technical {
    background: var(--yellow);
    color: white;
}

.category-badge.reference {
    background: var(--purple);
    color: white;
}

/* ============================================================================
   Project Card - Flat design matching wireframe
   ============================================================================ */

.project-card {
    background: white;
    border: 1px solid var(--gray-200);
    margin-bottom: 16px;
    overflow: hidden;
}

/* Project Header */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--gray-100);
    cursor: pointer;
    transition: background 0.2s ease;
}

.project-header:hover {
    background: var(--gray-200);
}

.project-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.collapse-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
    transition: transform 0.3s ease;
}

.project-card.collapsed .collapse-btn {
    transform: rotate(-90deg);
}

.project-title-section {
    flex: 1;
    min-width: 0;
}

.project-name {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.status-badge.planning {
    background: var(--blue);
    color: white;
}

.status-badge.in_progress {
    background: var(--teal);
    color: white;
}

.status-badge.testing {
    background: var(--purple);
    color: white;
}

.status-badge.complete {
    background: var(--green);
    color: white;
}

.status-badge.on_hold {
    background: var(--gray-500);
    color: white;
}

.completion-text {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.project-header-right {
    display: flex;
    gap: 4px;
}

.icon-btn-sm {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 0;
    font-size: 14px;
    transition: background 0.2s ease;
}

.icon-btn-sm:hover {
    background: #e5e7eb;
}

/* Progress Bar - Flat design */
.progress-bar-container {
    padding: 0 12px 12px 12px;
    background: var(--gray-100);
}

.progress-bar {
    height: 8px;
    width: 100%;
    background: var(--gray-200);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--teal);
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 600;
    margin-top: 6px;
}

/* Project Body */
.project-body {
    display: block;
    transition: max-height 0.3s ease;
}

.project-card.collapsed .project-body {
    display: none;
}

/* ============================================================================
   Tabs
   ============================================================================ */

.project-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.project-tabs::-webkit-scrollbar {
    height: 3px;
}

.project-tabs::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.project-tabs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 0;
}

.tab-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    background: none;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--gray-900);
    background: var(--gray-50);
}

.tab-btn.active {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

/* ============================================================================
   Tab Content
   ============================================================================ */

.tab-content-container {
    background: white;
}

.tab-content {
    display: none;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.tab-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.add-item-btn {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--teal);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-item-btn:hover {
    background: var(--teal-dark);
}

/* ============================================================================
   Status Tab
   ============================================================================ */

.status-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-row {
    display: flex;
    gap: 8px;
}

.status-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    min-width: 100px;
}

.status-value {
    color: #111827;
    font-size: 13px;
    flex: 1;
}

/* ============================================================================
   Checklist Tab
   ============================================================================ */

.phase-filter {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.filter-btn.active {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

/* Phase-specific filter colors */
.filter-btn.plan {
    border-color: var(--blue);
    color: var(--blue);
}

.filter-btn.plan.active {
    background: var(--blue);
    color: white;
}

.filter-btn.design {
    border-color: var(--pink);
    color: var(--pink);
}

.filter-btn.design.active {
    background: var(--pink);
    color: white;
}

.filter-btn.build {
    border-color: var(--yellow);
    color: var(--yellow);
}

.filter-btn.build.active {
    background: var(--yellow);
    color: white;
}

.filter-btn.test {
    border-color: var(--purple);
    color: var(--purple);
}

.filter-btn.test.active {
    background: var(--purple);
    color: white;
}

.filter-btn.doc {
    border-color: var(--green);
    color: var(--green);
}

.filter-btn.doc.active {
    background: var(--green);
    color: white;
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 11px;
    border-bottom: 1px solid var(--gray-100);
}

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

.checklist-item:hover {
    background: var(--gray-50);
}

.checklist-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.task-checkbox,
.mini-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    background: white;
}

.mini-checkbox.checked,
.task-checkbox:checked {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.mini-checkbox.checked::after {
    content: '✓';
    font-size: 10px;
    color: white;
}

.task-description {
    font-size: 11px;
    color: var(--gray-900);
    line-height: 1.4;
    flex: 1;
}

.checklist-item.completed .task-description {
    text-decoration: line-through;
    color: var(--gray-400);
}

.checklist-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phase-tag {
    padding: 2px 6px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e5e7eb;
    color: #6b7280;
}

.phase-tag.planning {
    background: #dbeafe;
    color: #1e40af;
}

.phase-tag.design {
    background: #fce7f3;
    color: #9f1239;
}

.phase-tag.build {
    background: #fef3c7;
    color: #92400e;
}

.phase-tag.test {
    background: #e0e7ff;
    color: #3730a3;
}

.phase-tag.doc {
    background: #f3e8ff;
    color: #6b21a8;
}

/* ============================================================================
   Resources Tab - Matches wireframe resource-link design
   ============================================================================ */

.resources-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resource-item,
.resource-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--gray-50);
    cursor: pointer;
    transition: background 0.2s;
}

.resource-item:hover,
.resource-link:hover {
    background: var(--gray-100);
}

.resource-main {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.resource-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-900);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
    word-break: break-word;
}

.resource-title:hover {
    color: var(--teal);
}

.resource-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resource-type {
    font-size: 9px;
    color: var(--gray-600);
}

.resource-description {
    margin: 0;
    font-size: 10px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* ============================================================================
   Notes Tab
   ============================================================================ */

.notes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-item {
    padding: 12px;
    background: #fffbeb;
    border-left: 4px solid #fbbf24;
    border-radius: 0;
}

.note-content {
    font-size: 13px;
    color: #111827;
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

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

.note-date {
    font-size: 11px;
    color: #92400e;
}

/* ============================================================================
   Business Rules & Decisions Tabs
   ============================================================================ */

.rules-container,
.decisions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item,
.decision-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.rule-title,
.decision-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.rule-description,
.decision-rationale {
    margin: 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.decision-alternatives {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* ============================================================================
   Widgets Tab
   ============================================================================ */

.widgets-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.widget-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.widget-name {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.widget-description {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.widget-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #6b7280;
}

.widget-location,
.widget-type {
    padding: 2px 6px;
    background: #e5e7eb;
    border-radius: 0;
    font-weight: 500;
}

/* ============================================================================
   User Requests Tab
   ============================================================================ */

.requests-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.request-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.request-header {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.request-type-badge,
.request-priority-badge,
.request-status-badge {
    padding: 2px 8px;
    border-radius: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.request-type-badge.feature_request {
    background: var(--purple);
    color: white;
}

.request-type-badge.bug_report {
    background: var(--red);
    color: white;
}

.request-type-badge.improvement {
    background: var(--teal);
    color: white;
}

.request-type-badge.question {
    background: var(--blue);
    color: white;
}

.request-priority-badge.low {
    background: #f3f4f6;
    color: #4b5563;
}

.request-priority-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.request-priority-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

.request-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.request-status-badge.accepted {
    background: #d1fae5;
    color: #065f46;
}

.request-status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.request-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.request-description {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.request-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.request-submitter,
.request-date {
    font-size: 11px;
    color: #6b7280;
}

.request-actions {
    display: flex;
    gap: 6px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

/* ============================================================================
   Panel Footer
   ============================================================================ */

.panel-footer {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid var(--gray-200);
}

.add-project-btn {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    background: var(--teal);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-project-btn:hover {
    background: var(--teal-dark);
}

/* ============================================================================
   Developer Panel Modals (New branded style)
   ============================================================================ */

.dev-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-modal {
    background: white;
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dev-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.dev-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.dev-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.dev-modal-close:hover {
    color: var(--gray-700);
}

.dev-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.dev-modal-request-summary {
    background: var(--gray-50);
    border-radius: 0;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-left: 4px solid var(--teal);
}

.dev-modal-request-summary h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.dev-modal-request-summary p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.4;
}

.dev-modal-form-group {
    margin-bottom: 16px;
}

.dev-modal-form-group:last-child {
    margin-bottom: 0;
}

.dev-modal-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.dev-modal-form-group input[type="text"],
.dev-modal-form-group textarea,
.dev-modal-form-group select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: 0;
    background: white;
    color: var(--gray-900);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.dev-modal-form-group input[type="text"]:focus,
.dev-modal-form-group textarea:focus,
.dev-modal-form-group select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.dev-modal-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.dev-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.dev-modal-actions .btn-secondary {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dev-modal-actions .btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.dev-modal-actions .btn-accept {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dev-modal-actions .btn-accept:hover {
    background: #059669;
}

.dev-modal-actions .btn-reject {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dev-modal-actions .btn-reject:hover {
    background: #dc2626;
}

.dev-modal-actions .btn-convert {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dev-modal-actions .btn-convert:hover {
    background: #9333ea;
}

/* ============================================================================
   Modals (Legacy)
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: white;
    border: 1px solid var(--gray-200);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

/* ============================================================================
   Forms
   ============================================================================ */

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

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-900);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--teal);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-group {
    margin-bottom: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #14b8a6;
}

.btn-secondary {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* Settings Section */
.settings-section {
    margin-bottom: 24px;
}

.settings-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* ============================================================================
   Empty States
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 14px;
    margin: 0;
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 768px) {
    .dev-panel-container {
        width: 100%;
        right: -100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
