/* IncidentWP Agent - Compact Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Hide WordPress Footer */
#wpfooter {
    display: none !important;
}

/* Reset */
.iwp-app,
.iwp-app * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#wpwrap,
#wpcontent,
#wpbody,
#wpbody-content {
    background: #000000;
}

#wpcontent {
    padding-left: 0 !important;
    padding-top: 0 !important;
}

#wpbody-content {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.iwp-app svg {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
    fill: currentColor;
}

.iwp-btn svg {
    width: 14px;
    height: 14px;
}

.iwp-btn-sm svg {
    width: 12px;
    height: 12px;
}

/* Main Container */
.iwp-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    color: #fafafa;
    margin: -16px 0 0 !important;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header - Compact */
.iwp-header {
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    border-bottom: 1px solid #1a1a1a;
    padding: 0 0 12px;
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 32px);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.iwp-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.iwp-logo img {
    height: 24px;
    width: auto;
}

/* Navigation - Compact */
.iwp-nav {
    display: flex;
    gap: 2px;
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.iwp-nav-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #737373;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}

.iwp-nav-item:hover {
    background: #1a1a1a;
    color: #fafafa;
}

.iwp-nav-item.active {
    background: #1a1a1a;
    color: #3dd68c;
}

.iwp-nav-icon {
    display: none;
}

/* Header Actions - Compact */
.iwp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iwp-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #a1a1a1;
}

.iwp-status-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3dd68c;
}

/* Main Content */
.iwp-main {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
    flex: 1 1 auto;
}

.iwp-main > .iwp-alert {
    margin-top: 12px;
}

/* Page Header */
.iwp-page-header {
    margin-top: 16px;
    margin-bottom: 20px;
}


.iwp-nav-icon {
    display: none;
}

#adminmenu .toplevel_page_incidentwp .wp-menu-image,
#adminmenu .toplevel_page_incidentwp .wp-menu-image img,
#adminmenu .toplevel_page_incidentwp .wp-menu-image svg,
#adminmenu .toplevel_page_incidentwp .wp-menu-image:before {
    border-radius: 15px !important;
}

#adminmenu .toplevel_page_incidentwp .wp-menu-image {
    overflow: hidden !important;
}

#adminmenu .toplevel_page_incidentwp .wp-menu-image img,
#adminmenu .toplevel_page_incidentwp .wp-menu-image svg {
    display: block;
}

.iwp-page-title {
    font-size: 22px;
    font-weight: 600;
    color: #fafafa;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.iwp-page-subtitle {
    font-size: 13px;
    color: #737373;
}

/* Stats Grid */
.iwp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.iwp-stat {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 5px;
    padding: 14px;
    transition: border-color 0.15s;
}

.iwp-stat:hover {
    border-color: #2a2a2a;
}

.iwp-stat-label {
    font-size: 10px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.iwp-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #fafafa;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.iwp-stat-meta {
    font-size: 11px;
    color: #737373;
}

/* Cards */
.iwp-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.iwp-card:hover {
    border-color: #2a2a2a;
}

.iwp-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.iwp-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fafafa;
}

.iwp-card-body {
    padding: 16px;
}

/* Buttons - Compact */
.iwp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
}

.iwp-btn-primary {
    background: #3dd68c;
    color: #000000;
}

.iwp-btn-primary:hover {
    background: #4de69c;
    color: #000000;
}

.iwp-btn-secondary {
    background: transparent;
    color: #fafafa;
    border: 1px solid #2a2a2a;
}

.iwp-btn-secondary:hover {
    background: #0a0a0a;
    border-color: #3a3a3a;
    color: #fafafa;
}

.iwp-btn-ghost {
    background: transparent;
    color: #999999;
    border: 1px solid #1a1a1a;
}

.iwp-btn-ghost:hover {
    color: #fafafa;
    border-color: #2a2a2a;
    background: #0a0a0a;
}

.iwp-btn-sm {
    padding: 3px 8px;
    font-size: 11px;
}

.iwp-btn-block {
    width: 100%;
}

/* Forms */
.iwp-form-group {
    margin-bottom: 14px;
}

.iwp-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #a1a1a1;
    margin-bottom: 6px;
}

.iwp-form-group input {
    width: 100%;
    padding: 7px 10px;
    background: #000000;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    font-size: 12px;
    color: #fafafa;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
}

.iwp-form-group select {
    width: 100%;
    padding: 7px 10px;
    background: #000000;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    font-size: 12px;
    color: #fafafa;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
}

.iwp-form-group select:focus {
    outline: none;
    border-color: #3dd68c;
}

.iwp-form-group input::placeholder {
    color: #666666;
}

.iwp-form-group input:focus {
    outline: none;
    border-color: #3dd68c;
}

.iwp-form-group + .iwp-btn-block {
    margin-top: 6px;
}

/* Alerts */
.iwp-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 12px;
}

.iwp-alert.success {
    background: rgba(61, 214, 140, 0.1);
    border: 1px solid rgba(61, 214, 140, 0.3);
    color: #3dd68c;
}

.iwp-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.iwp-alert-icon {
    display: none;
}

/* Tabs */
.iwp-tab {
    display: none;
}

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

/* Info Grid */
.iwp-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.iwp-info-item {
    padding: 10px;
    background: #000000;
    border: 1px solid #1a1a1a;
    border-radius: 3px;
}

.iwp-info-label {
    font-size: 10px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.iwp-info-value {
    font-size: 12px;
    color: #fafafa;
    word-break: break-all;
}

/* Badge */
.iwp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iwp-badge.success {
    background: rgba(61, 214, 140, 0.1);
    color: #3dd68c;
    border: 1px solid rgba(61, 214, 140, 0.3);
}

.iwp-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Events List - Compact */
.iwp-events {
    display: flex;
    flex-direction: column;
}

.iwp-event {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
}

.iwp-event:last-child {
    border-bottom: none;
}

.iwp-event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
    background: #666666;
}

.iwp-event-dot.info { background: #666666; }
.iwp-event-dot.warning { background: #f59e0b; }
.iwp-event-dot.error { background: #ef4444; }

.iwp-event-content {
    flex: 1;
    min-width: 0;
}

.iwp-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.iwp-event-type {
    font-size: 13px;
    font-weight: 500;
    color: #fafafa;
}

.iwp-event-time {
    font-size: 11px;
    color: #666666;
}

.iwp-event-details {
    font-size: 12px;
    color: #999999;
    margin-top: 2px;
}

.iwp-event-user {
    font-size: 11px;
    color: #666666;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
}

/* Empty State */
.iwp-empty {
    text-align: center;
    padding: 40px 24px;
}

.iwp-empty-icon {
    font-size: 36px;
    opacity: 0.3;
    margin-bottom: 12px;
}

.iwp-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #fafafa;
    margin-bottom: 6px;
}

.iwp-empty-text {
    font-size: 13px;
    color: #737373;
}

/* Auth Pages */
.iwp-auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    min-height: 400px;
}

.iwp-auth-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 5px;
    padding: 28px;
    width: 100%;
    max-width: 400px;
}

.iwp-auth-header {
    margin-bottom: 20px;
    text-align: center;
}

.iwp-auth-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fafafa;
    margin-bottom: 6px;
}

.iwp-auth-header p {
    font-size: 12px;
    color: #666666;
}

.iwp-auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: #666666;
}

.iwp-auth-footer a {
    color: #3dd68c;
    text-decoration: none;
}

.iwp-auth-footer a:hover {
    color: #4de69c;
}

/* Connect Screen */
.iwp-connect-box {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 14px;
}

.iwp-connect-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.iwp-connect-label {
    font-size: 12px;
    color: #a1a1a1;
}

.iwp-connect-value {
    font-weight: 600;
    color: #fafafa;
    font-size: 12px;
}

.iwp-progress-bar {
    background: #1f1f1f;
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
}

.iwp-progress-fill {
    background: #3dd68c;
    height: 100%;
    transition: width 0.3s ease;
}

.iwp-site-label {
    font-size: 12px;
    color: #a1a1a1;
    margin-bottom: 6px;
}

.iwp-site-name {
    font-weight: 600;
    color: #fafafa;
    font-size: 13px;
}

.iwp-site-url {
    font-size: 11px;
    color: #737373;
    margin-top: 3px;
}

.iwp-plan-tag {
    color: #737373;
}

.iwp-mt-3 {
    margin-top: 10px;
}

/* Action Buttons */
.iwp-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.iwp-footer {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 16px 0;
    border-top: 1px solid #1a1a1a;
    color: #666666;
    font-size: 12px;
    margin-top: auto;
}

.iwp-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.iwp-footer a {
    color: #3dd68c;
    text-decoration: none;
}

.iwp-footer a:hover {
    color: #4de69c;
}

/* Responsive */
@media (max-width: 1024px) {
    .iwp-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .iwp-app {
        margin: 0 !important;
        width: 100%;
    }
    .iwp-header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 12px;
    }

    .iwp-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .iwp-nav-icon {
        display: inline-flex;
    }

    .iwp-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 100000;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(10px);
        border-top: 1px solid #1a1a1a;
        padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.55);
        transform: translateZ(0);
        gap: 8px;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        max-width: none;
        margin: 0;
    }

    .iwp-nav-item {
        flex: 1;
        justify-content: center;
        gap: 6px;
        padding: 10px 8px;
        border-radius: 10px;
        font-size: 12px;
        color: #999999;
    }

    .iwp-nav-item.active {
        background: #111111;
        color: #3dd68c;
    }

    .iwp-main {
        padding: 40px 12px 120px 12px;
    }

    .iwp-page-title {
        font-size: 18px;
    }

    .iwp-stats {
        grid-template-columns: 1fr;
    }

    .iwp-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .iwp-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .iwp-info-grid {
        grid-template-columns: 1fr;
    }

    .iwp-actions {
        flex-direction: column;
    }

    .iwp-page-header {
        margin-top: 10px;
    }
}

@media (max-width: 600px) {
    .iwp-auth-card {
        padding: 20px;
    }
}
