/* ============================================================================
   ReportHub - Microsoft Azure Portal Style Design System
   ============================================================================ */

/* Import Segoe UI alternative (Inter) for professional typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset and base styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Azure Color Palette */
    --azure-blue: #0078d4;
    --azure-blue-dark: #106ebe;
    --azure-blue-darker: #005a9e;
    --azure-blue-light: #deecf9;
    --azure-blue-lighter: #eff6fc;

    /* Neutral Palette - Azure Style */
    --neutral-0: #ffffff;
    --neutral-2: #fafafa;
    --neutral-4: #f5f5f5;
    --neutral-6: #f0f0f0;
    --neutral-8: #edebe9;
    --neutral-10: #e1dfdd;
    --neutral-20: #c8c6c4;
    --neutral-30: #a19f9d;
    --neutral-40: #8a8886;
    --neutral-60: #605e5c;
    --neutral-80: #3b3a39;
    --neutral-90: #323130;
    --neutral-100: #201f1e;

    /* Semantic Colors */
    --success: #107c10;
    --success-light: #dff6dd;
    --success-dark: #0b5a0b;
    --warning: #ffb900;
    --warning-light: #fff4ce;
    --warning-dark: #986f0b;
    --error: #d13438;
    --error-light: #fde7e9;
    --error-dark: #a4262c;
    --info: #0078d4;
    --info-light: #deecf9;

    /* Shared/Semantic Aliases */
    --bg-page: var(--neutral-4);
    --bg-card: var(--neutral-0);
    --bg-hover: var(--neutral-6);
    --bg-active: var(--azure-blue-lighter);
    --border-color: var(--neutral-10);
    --border-color-strong: var(--neutral-20);
    --text-primary: var(--neutral-90);
    --text-secondary: var(--neutral-60);
    --text-tertiary: var(--neutral-40);
    --text-link: var(--azure-blue);
    --text-on-accent: var(--neutral-0);

    /* Layout */
    --nav-width: 48px;
    --nav-width-expanded: 280px;
    --header-height: 48px;
    --breadcrumb-height: 40px;
    --command-bar-height: 44px;

    /* Shadows - Azure style (subtle) */
    --shadow-2: 0 0 2px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14);
    --shadow-4: 0 0 2px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.14);
    --shadow-8: 0 0 2px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.14);
    --shadow-16: 0 0 2px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.14);
    --shadow-28: 0 0 8px rgba(0,0,0,0.12), 0 14px 28px rgba(0,0,0,0.20);

    /* Border radius */
    --radius-sm: 2px;
    --radius: 4px;
    --radius-lg: 8px;

    /* Transitions */
    --transition-fast: 100ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    min-height: 100vh;
}

/* ============================================================================
   Top Header Bar (Azure Style)
   ============================================================================ */

.azure-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--neutral-90);
    color: var(--neutral-0);
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 1000;
    gap: 8px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.header-brand svg {
    width: 24px;
    height: 24px;
    color: var(--azure-blue);
}

.header-brand-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header-nav-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--neutral-0);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}

.header-nav-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.header-nav-toggle svg {
    width: 20px;
    height: 20px;
}

.header-search {
    flex: 1;
    max-width: 480px;
    margin: 0 24px;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 32px;
    padding: 0 12px 0 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    color: var(--neutral-0);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.6);
}

.header-search input:focus {
    outline: none;
    background: var(--neutral-0);
    color: var(--text-primary);
    border-color: transparent;
}

.header-search input:focus::placeholder {
    color: var(--text-tertiary);
}

.header-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255,255,255,0.6);
    pointer-events: none;
}

.header-search input:focus + svg {
    color: var(--text-tertiary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--neutral-0);
    cursor: pointer;
    border-radius: var(--radius);
    position: relative;
    transition: background var(--transition-fast);
}

.header-action-btn:hover {
    background: rgba(255,255,255,0.1);
}

.header-action-btn svg {
    width: 20px;
    height: 20px;
}

.header-action-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid var(--neutral-90);
}

/* ============================================================================
   Left Navigation (Azure Style)
   ============================================================================ */

.azure-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--nav-width);
    background: var(--neutral-6);
    border-right: 1px solid var(--border-color);
    z-index: 900;
    display: flex;
    flex-direction: column;
    transition: width var(--transition);
    overflow: hidden;
}

.azure-nav.expanded {
    width: var(--nav-width-expanded);
}

.nav-items {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border-left: 3px solid transparent;
    margin: 1px 0;
}

.nav-item:hover {
    background: var(--bg-hover);
}

.nav-item.active {
    background: var(--bg-active);
    border-left-color: var(--azure-blue);
    color: var(--azure-blue);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item span {
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--transition);
}

.azure-nav.expanded .nav-item span {
    opacity: 1;
}

.nav-section {
    padding: 16px 14px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity var(--transition);
}

.azure-nav.expanded .nav-section {
    opacity: 1;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 14px;
}

/* ============================================================================
   Main Content Area
   ============================================================================ */

.azure-main {
    margin-left: var(--nav-width);
    margin-top: var(--header-height);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left var(--transition);
}

.azure-nav.expanded ~ .azure-main {
    margin-left: var(--nav-width-expanded);
}

/* Breadcrumb Bar */
.breadcrumb-bar {
    height: var(--breadcrumb-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-item {
    color: var(--text-link);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-item:hover {
    text-decoration: underline;
}

.breadcrumb-item svg {
    width: 16px;
    height: 16px;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Command Bar */
.command-bar {
    height: var(--command-bar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.command-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
}

.command-btn:hover {
    background: var(--bg-hover);
}

.command-btn.primary {
    background: var(--azure-blue);
    color: var(--text-on-accent);
}

.command-btn.primary:hover {
    background: var(--azure-blue-dark);
}

.command-btn svg {
    width: 16px;
    height: 16px;
}

.command-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.command-bar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================================================
   Cards & Tiles (Azure Style)
   ============================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-4);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg {
    width: 18px;
    height: 18px;
    color: var(--azure-blue);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--neutral-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Resource Tiles (Azure Portal Style) */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.resource-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
    display: block;
}

.resource-tile:hover {
    border-color: var(--azure-blue);
    box-shadow: var(--shadow-8);
    transform: translateY(-2px);
}

.resource-tile-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.resource-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resource-tile-icon svg {
    width: 24px;
    height: 24px;
}

.resource-tile-icon.blue {
    background: var(--azure-blue-light);
    color: var(--azure-blue);
}

.resource-tile-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.resource-tile-icon.orange {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.resource-tile-icon.red {
    background: var(--error-light);
    color: var(--error);
}

.resource-tile-info {
    flex: 1;
    min-width: 0;
}

.resource-tile-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-tile-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.resource-tile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.resource-stat {
    text-align: center;
}

.resource-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.resource-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Metric Cards (Dashboard) */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--azure-blue);
}

.metric-card.success::before { background: var(--success); }
.metric-card.warning::before { background: var(--warning); }
.metric-card.error::before { background: var(--error); }

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-label svg {
    width: 14px;
    height: 14px;
}

.metric-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--error);
}

.metric-change svg {
    width: 12px;
    height: 12px;
}

/* ============================================================================
   Tables (Azure Style)
   ============================================================================ */

.data-table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--neutral-4);
    padding: 10px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th:first-child {
    padding-left: 20px;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table td:first-child {
    padding-left: 20px;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .cell-link {
    color: var(--text-link);
    text-decoration: none;
    font-weight: 500;
}

.data-table .cell-link:hover {
    text-decoration: underline;
}

.data-table .cell-mono {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 12px;
    background: var(--neutral-4);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* ============================================================================
   Buttons (Azure Style)
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--azure-blue);
    color: var(--text-on-accent);
    border-color: var(--azure-blue);
}

.btn-primary:hover {
    background: var(--azure-blue-dark);
    border-color: var(--azure-blue-dark);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color-strong);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--neutral-30);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--error);
    color: var(--text-on-accent);
    border-color: var(--error);
}

.btn-danger:hover {
    background: var(--error-dark);
    border-color: var(--error-dark);
}

.btn-success {
    background: var(--success);
    color: var(--text-on-accent);
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

/* ============================================================================
   Forms (Azure Style)
   ============================================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--error);
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-control:hover {
    border-color: var(--neutral-30);
}

.form-control:focus {
    outline: none;
    border-color: var(--azure-blue);
    box-shadow: 0 0 0 1px var(--azure-blue);
}

.form-control:disabled {
    background: var(--neutral-6);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23605e5c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-label input, .radio-label input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--azure-blue);
}

/* Search Input */
.search-input {
    position: relative;
}

.search-input input {
    padding-left: 36px;
}

.search-input svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    pointer-events: none;
}

/* ============================================================================
   Badges & Status (Azure Style)
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge svg {
    width: 12px;
    height: 12px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.badge-error {
    background: var(--error-light);
    color: var(--error-dark);
}

.badge-info {
    background: var(--info-light);
    color: var(--azure-blue-darker);
}

.badge-neutral {
    background: var(--neutral-8);
    color: var(--text-secondary);
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.error { background: var(--error); }
.status-dot.offline { background: var(--neutral-30); }

/* ============================================================================
   Alerts & Notifications (Azure Style)
   ============================================================================ */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.alert-success {
    background: var(--success-light);
    border-left: 4px solid var(--success);
    color: var(--success-dark);
}

.alert-warning {
    background: var(--warning-light);
    border-left: 4px solid var(--warning);
    color: var(--warning-dark);
}

.alert-error, .alert-danger {
    background: var(--error-light);
    border-left: 4px solid var(--error);
    color: var(--error-dark);
}

.alert-info {
    background: var(--info-light);
    border-left: 4px solid var(--azure-blue);
    color: var(--azure-blue-darker);
}

/* ============================================================================
   Empty State
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--neutral-6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    color: var(--neutral-30);
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 320px;
    margin: 0 auto 20px;
}

/* ============================================================================
   Upload Area (Azure Style)
   ============================================================================ */

.upload-dropzone {
    border: 2px dashed var(--border-color-strong);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--neutral-2);
}

.upload-dropzone:hover {
    border-color: var(--azure-blue);
    background: var(--azure-blue-lighter);
}

.upload-dropzone.dragover {
    border-color: var(--azure-blue);
    background: var(--azure-blue-light);
    transform: scale(1.01);
}

.upload-dropzone-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-4);
}

.upload-dropzone-icon svg {
    width: 32px;
    height: 32px;
    color: var(--azure-blue);
}

.upload-dropzone h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-dropzone p {
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-dropzone .browse-link {
    color: var(--azure-blue);
    font-weight: 600;
}

/* File List */
.file-list {
    list-style: none;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.file-list-item:hover {
    background: var(--bg-hover);
}

.file-list-item:last-child {
    border-bottom: none;
}

.file-icon {
    width: 36px;
    height: 36px;
    background: var(--neutral-6);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon svg {
    width: 18px;
    height: 18px;
    color: var(--azure-blue);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 4px;
}

/* ============================================================================
   Folder Tree / Navigation (Azure Style)
   ============================================================================ */

.folder-tree {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.folder-tree-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: var(--neutral-2);
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--text-primary);
    border-left: 3px solid transparent;
}

.folder-item:hover {
    background: var(--bg-hover);
}

.folder-item.active {
    background: var(--bg-active);
    border-left-color: var(--azure-blue);
}

.folder-item svg {
    width: 18px;
    height: 18px;
    color: var(--azure-blue);
    flex-shrink: 0;
}

.folder-item span {
    font-size: 13px;
    font-weight: 500;
}

.folder-item .count {
    margin-left: auto;
    background: var(--neutral-8);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ============================================================================
   Progress & Loading (Azure Style)
   ============================================================================ */

.progress-bar {
    height: 4px;
    background: var(--neutral-10);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--azure-blue);
    border-radius: 2px;
    transition: width var(--transition);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neutral-20);
    border-top-color: var(--azure-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   Pagination (Azure Style)
   ============================================================================ */

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination-btn:hover {
    background: var(--bg-hover);
    border-color: var(--neutral-30);
}

.pagination-btn.active {
    background: var(--azure-blue);
    border-color: var(--azure-blue);
    color: var(--text-on-accent);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 12px;
}

/* ============================================================================
   Tabs (Azure Style)
   ============================================================================ */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--azure-blue);
    border-bottom-color: var(--azure-blue);
}

/* ============================================================================
   Modal / Panel (Azure Blade Style)
   ============================================================================ */

.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.panel {
    position: fixed;
    top: var(--header-height);
    right: -500px;
    bottom: 0;
    width: 500px;
    max-width: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-28);
    z-index: 1101;
    display: flex;
    flex-direction: column;
    transition: right var(--transition);
}

.panel.open {
    right: 0;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.panel-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.panel-close svg {
    width: 20px;
    height: 20px;
}

.panel-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.panel-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ============================================================================
   Grid Layouts
   ============================================================================ */

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-link { color: var(--text-link); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.bg-page { background: var(--bg-page); }
.bg-card { background: var(--bg-card); }
.bg-hover { background: var(--bg-hover); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 12px; }
.text-base { font-size: 13px; }
.text-lg { font-size: 15px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow-4); }
.shadow-lg { box-shadow: var(--shadow-8); }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================================
   Responsive Navigation
   ============================================================================ */

@media (max-width: 768px) {
    .azure-nav {
        transform: translateX(-100%);
        width: var(--nav-width-expanded);
    }

    .azure-nav.expanded {
        transform: translateX(0);
    }

    .azure-nav .nav-item span,
    .azure-nav .nav-section {
        opacity: 1;
    }

    .azure-main {
        margin-left: 0;
    }

    .page-content {
        padding: 16px;
    }
}

/* ============================================================================
   Process Flow Diagram - BPMN Style
   ============================================================================ */

.process-flow {
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.process-flow-header {
    background: var(--azure-blue);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.process-flow-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Swimlanes */
.swimlane {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    min-height: 100px;
}

.swimlane:last-child {
    border-bottom: none;
}

.swimlane-label {
    width: 140px;
    flex-shrink: 0;
    background: var(--neutral-4);
    border-right: 2px solid var(--azure-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-align: center;
}

.swimlane-label-text {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neutral-80);
}

.swimlane-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px 24px;
    gap: 0;
    position: relative;
    overflow-x: auto;
}

/* Process Steps */
.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.process-step-box {
    background: var(--azure-blue-light);
    border: 2px solid var(--azure-blue);
    border-radius: var(--radius);
    padding: 12px 20px;
    min-width: 140px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.process-step-box:hover {
    background: var(--azure-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-8);
}

.process-step-box.start {
    background: var(--success-light);
    border-color: var(--success);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    min-width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step-box.start:hover {
    background: var(--success);
}

.process-step-box.end {
    background: var(--error-light);
    border-color: var(--error);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    min-width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step-box.end:hover {
    background: var(--error);
}

.process-step-box.decision {
    background: var(--warning-light);
    border-color: var(--warning-dark);
    transform: rotate(45deg);
    width: 48px;
    height: 48px;
    min-width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step-box.decision:hover {
    background: var(--warning);
}

.process-step-box.decision .step-icon {
    transform: rotate(-45deg);
}

.process-step-box.data-store {
    border-radius: 8px 8px 50% 50% / 8px 8px 20px 20px;
    background: linear-gradient(180deg, var(--neutral-6) 0%, var(--neutral-10) 100%);
    border-color: var(--neutral-40);
}

.process-step-box.data-store:hover {
    background: linear-gradient(180deg, var(--neutral-20) 0%, var(--neutral-30) 100%);
    color: white;
}

.process-step-box.highlight {
    background: var(--azure-blue);
    color: white;
    box-shadow: var(--shadow-8);
}

.step-number {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--azure-blue);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: var(--shadow-4);
}

.step-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
    color: var(--azure-blue);
}

.process-step-box:hover .step-icon {
    color: inherit;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.step-sublabel {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.process-step-box:hover .step-sublabel {
    color: inherit;
    opacity: 0.8;
}

/* Arrows */
.process-arrow {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 4px;
    z-index: 1;
}

.process-arrow svg {
    width: 48px;
    height: 24px;
    color: var(--azure-blue);
}

.process-arrow.vertical {
    flex-direction: column;
    padding: 4px 0;
}

.process-arrow.vertical svg {
    width: 24px;
    height: 32px;
    transform: rotate(90deg);
}

.arrow-label {
    font-size: 10px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: -12px;
    margin-right: -12px;
    z-index: 2;
    position: relative;
}

/* Dashed connector for data flow */
.process-connector {
    flex: 1;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--neutral-30) 0px,
        var(--neutral-30) 6px,
        transparent 6px,
        transparent 12px
    );
    min-width: 24px;
}

/* Process Flow Legend */
.process-legend {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: var(--neutral-4);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-shape {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-shape.process {
    background: var(--azure-blue-light);
    border: 2px solid var(--azure-blue);
    border-radius: var(--radius-sm);
    width: 28px;
    height: 20px;
}

.legend-shape.decision {
    background: var(--warning-light);
    border: 2px solid var(--warning-dark);
    transform: rotate(45deg);
    width: 16px;
    height: 16px;
}

.legend-shape.data {
    background: var(--neutral-10);
    border: 2px solid var(--neutral-40);
    border-radius: 4px 4px 50% 50% / 4px 4px 10px 10px;
    width: 20px;
    height: 18px;
}

.legend-shape.start-end {
    background: var(--success-light);
    border: 2px solid var(--success);
    border-radius: 50%;
    width: 18px;
    height: 18px;
}

/* Swimlane colors */
.swimlane.user .swimlane-label {
    background: #e8f4f8;
    border-right-color: #0891b2;
}

.swimlane.interface .swimlane-label {
    background: var(--azure-blue-lighter);
    border-right-color: var(--azure-blue);
}

.swimlane.pipeline .swimlane-label {
    background: #fef3c7;
    border-right-color: #d97706;
}

.swimlane.storage .swimlane-label {
    background: #f3e8ff;
    border-right-color: #9333ea;
}

/* Vertical connectors between swimlanes */
.vertical-connector {
    position: absolute;
    width: 2px;
    background: var(--azure-blue);
    z-index: 1;
}

.vertical-connector::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--azure-blue);
}

/* Responsive */
@media (max-width: 900px) {
    .swimlane-label {
        width: 40px;
        padding: 8px 4px;
    }

    .swimlane-label-text {
        font-size: 10px;
    }

    .swimlane-content {
        padding: 12px 16px;
    }

    .process-step-box {
        min-width: 100px;
        padding: 8px 12px;
    }

    .step-icon {
        width: 20px;
        height: 20px;
    }

    .step-label {
        font-size: 11px;
    }

    .process-arrow svg {
        width: 32px;
    }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
    .azure-header,
    .azure-nav,
    .command-bar,
    .breadcrumb-bar {
        display: none;
    }

    .azure-main {
        margin: 0;
    }

    .page-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
