* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 12px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

header h1 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-name {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.logout-btn {
    color: #0078d4;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid #0078d4;
    border-radius: 4px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #0078d4;
    color: white;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-input {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 300px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.1);
}

.search-input:focus::placeholder {
    color: #ccc;
    opacity: 0.6;
}

.btn-primary {
    background: #0078d4;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #106ebe;
}

.last-updated {
    color: #666;
    font-size: 14px;
}

.loading {
    background: white;
    padding: 16px 20px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    position: sticky;
    top: 12px;
    z-index: 100;
    border-left: 4px solid #0078d4;
}

.loading p {
    margin-top: 8px;
    color: #0066b8;
    font-weight: 600;
    font-size: 13px;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0078d4 0%, #106ebe 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0078d4;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fff4f4;
    color: #c00;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #c00;
}

.search-results {
    background: #e1f3ff;
    color: #0066b8;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    border-left: 4px solid #0078d4;
}

.search-highlight {
    background-color: #ffeb3b;
    color: #000;
    font-weight: 600;
    padding: 1px 2px;
    border-radius: 2px;
}

.dashboard-content {
    display: grid;
    gap: 16px;
}

.app-service-card {
    background: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
}

.app-service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.app-service-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.app-service-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.info-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.info-badge.resource-group {
    background: #e8f4fd;
    color: #0078d4;
}

.info-badge.location {
    background: #f0f0f0;
    color: #666;
}

.info-badge.status-running {
    background: #dff6dd;
    color: #107c10;
}

.info-badge.status-stopped {
    background: #fff4f4;
    color: #c00;
}

.info-badge.app-type-function {
    background: #f3e6ff;
    color: #5c2d91;
    font-weight: 600;
}

.info-badge.app-type-webapp {
    background: #e1f3ff;
    color: #0066b8;
    font-weight: 600;
}

.slots-section {
    margin-top: 8px;
}

.slots-header {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.deployment-slot {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.deployment-slot:hover {
    background: #f0f0f0;
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slot-name {
    font-size: 14px;
    font-weight: 600;
    color: #0078d4;
}

.slot-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 3px;
}

.detail-value {
    font-size: 13px;
    color: #333;
}

.detail-value.deployment-reason-highlight {
    font-weight: 600;
    color: #0078d4;
    background: #e1f3ff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.slot-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}

.btn-link.portal {
    background: #0078d4;
    color: white;
}

.btn-link.portal:hover {
    background: #106ebe;
    transform: translateY(-1px);
}

.btn-link.website {
    background: #107c10;
    color: white;
}

.btn-link.website:hover {
    background: #0e6b0e;
    transform: translateY(-1px);
}

.no-slots {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
}

.tag-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 3px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .app-service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .slot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .slot-details {
        grid-template-columns: 1fr;
    }
}
