:root {
    --primary-color: #201c50; /* Port Gore / Navy Blue */
    --primary-hover: rgb(22, 19, 56);
    --aqua-color: #00D9FF; /* eQuip Aqua */
    --aqua-light: rgba(0, 217, 255, 0.1);
    --success-color: #107c10;
    --success-hover: #0e6b0e;
    --danger-color: #d13438;
    --danger-hover: #b52e31;
    --warning-color: #ff8c00;
    --warning-hover: #e67e00;
    --info-color: #00bcf2;
    --info-hover: #00a6d6;
    --secondary-color: #605e5c;
    --bg-color: #F8F9FA;
    --card-bg: #ffffff;
    --text-primary: #201c50;
    --text-secondary: #605e5c;
    --border-color: #edebe9;
    --shadow: 0 3px 5px -1px rgba(0,0,0,0.2), 0 6px 10px 0 rgba(0,0,0,0.14);
    --shadow-hover: 0 7px 8px -4px rgba(0,0,0,0.2), 0 12px 17px 2px rgba(0,0,0,0.14);
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

/* Lucide Icons Styling */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
}

.feature-icon[data-lucide] {
    width: 40px;
    height: 40px;
    stroke-width: 2;
}

.btn-icon[data-lucide] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Material Web Components Overrides */
.mdc-button--raised.mdc-button--primary {
    background-color: var(--primary-color) !important;
}

.mdc-button--raised.mdc-button--primary:hover {
    background-color: var(--primary-hover) !important;
}

.mdc-button--raised.btn-success {
    background-color: var(--success-color) !important;
    color: white !important;
}

.mdc-button--raised.btn-success:hover {
    background-color: var(--success-hover) !important;
}

.mdc-button--raised.btn-danger {
    background-color: var(--danger-color) !important;
    color: white !important;
}

.mdc-button--raised.btn-danger:hover {
    background-color: var(--danger-hover) !important;
}

.mdc-button--raised.btn-warning {
    background-color: var(--warning-color) !important;
    color: white !important;
}

.mdc-button--raised.btn-warning:hover {
    background-color: var(--warning-hover) !important;
}

.mdc-card {
    padding: 0 !important;
}

.mdc-card__content {
    padding: 2rem;
}

.mdc-typography--headline2 {
    font-size: 3.5rem !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
}

.mdc-typography--headline6 {
    color: var(--text-primary) !important;
    margin-bottom: 1.5rem !important;
    font-weight: 500 !important;
}

.mdc-typography--subtitle1 {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.mdc-typography--body1 {
    color: var(--text-secondary) !important;
}

.mdc-typography--body2 {
    color: var(--text-secondary) !important;
}

.mdc-typography--caption {
    color: var(--text-secondary) !important;
}

/* Login Section */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 100vh;
    padding: 4rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.login-left {
    display: flex;
    flex-direction: column;
    max-width: 600px;
}

.login-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    width: 160px;
    height: auto;
    margin-bottom: 3rem;
}

.app-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    font-weight: 400;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #F8F9FA;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.feature:hover {
    background-color: #F0F1F3;
}

.feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: var(--aqua-color);
    background-color: var(--aqua-light);
    border-radius: 8px;
    padding: 8px;
    flex-shrink: 0;
}

.feature-icon[data-lucide] {
    stroke-width: 2.5;
}

.feature-content {
    flex: 1;
}

.feature h3 {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    letter-spacing: 0;
}

.feature p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.signin-section {
    background-color: var(--card-bg);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.signin-heading {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: 0;
}

.signin-section .mdc-button--raised {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    height: auto;
}

.signin-footer {
    margin-top: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Header */
.header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Card */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* VM Info */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: var(--text-secondary);
}

.value {
    color: var(--text-primary);
    font-weight: 500;
}

.value.loading {
    color: var(--text-secondary);
    font-style: italic;
}

/* Status Indicators */
.status-running {
    color: var(--success-color);
    font-weight: bold;
}

.status-stopped {
    color: var(--danger-color);
    font-weight: bold;
}

.status-starting,
.status-stopping {
    color: var(--warning-color);
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 0.875rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Roboto', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.2), 0px 6px 10px 0px rgba(0,0,0,0.14), 0px 1px 18px 0px rgba(0,0,0,0.12);
    min-height: 36px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FBFBFF;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    box-shadow: 0px 7px 8px -4px rgba(0,0,0,0.2), 0px 12px 17px 2px rgba(0,0,0,0.14), 0px 5px 22px 4px rgba(0,0,0,0.12);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #50494a;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 124, 16, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(209, 52, 56, 0.3);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: var(--warning-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover:not(:disabled) {
    background-color: var(--info-hover);
}

/* VM Controls */
.vm-controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.vm-controls .mdc-button {
    min-width: 140px;
}

.vm-controls .mdc-button .btn-icon {
    margin-right: 0;
}

/* Extension Controls */
.extension-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.extension-controls .mdc-select {
    min-width: 200px;
    flex: 1;
}

.extension-controls .mdc-button {
    min-width: 200px;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    transition: border-color 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Status Messages */
.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.status-message.success {
    background-color: #dff6dd;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.status-message.error {
    background-color: #fde7e9;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Activity Log */
.activity-log {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 0.75rem;
    background-color: var(--bg-color);
    border-radius: 0 4px 4px 0;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
}

.activity-text {
    color: var(--text-primary);
}

.no-activity {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 2rem;
    }

    .login-left {
        max-width: 100%;
    }

    .login-right {
        width: 100%;
    }

    .signin-section {
        max-width: 100%;
    }

    .app-title {
        font-size: 2.5rem;
    }

    .brand-logo {
        width: 140px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
    }

    .vm-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .extension-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .main-content {
        padding: 0 1rem;
    }

    .login-container {
        padding: 2rem 1.5rem;
    }

    .app-title {
        font-size: 2rem;
    }

    .app-subtitle {
        font-size: 1.125rem;
    }

    .card {
        padding: 1.5rem;
    }

    .login-container {
        padding: 2rem 1rem;
    }

    .app-title {
        font-size: 2rem;
    }

    .app-subtitle {
        font-size: 1rem;
    }

    .brand-logo {
        width: 150px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature {
        padding: 1.5rem;
    }
}

/* Modal Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-in-out;
}

.modal-overlay.hidden {
    display: none;
}

.modal-dialog {
    background: var(--card-bg);
    border-radius: 8px;
    min-width: 400px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-content {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-actions {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
}

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

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .modal-dialog {
        min-width: 90%;
        margin: 1rem;
    }
}
