* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

.hidden { display: none !important; }

.screen {
    min-height: 100vh;
}

/* Login */
.login-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 48px 40px;
    width: 400px;
    max-width: 90vw;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 4px;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #38bdf8;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    width: 100%;
    background: #38bdf8;
    color: #0f172a;
    font-weight: 600;
}

.btn-primary:hover { background: #7dd3fc; }

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
    background: #334155;
    color: #e2e8f0;
}

.btn-small:hover { background: #475569; }

.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #f87171; }

.error {
    margin-top: 16px;
    color: #f87171;
    font-size: 14px;
    text-align: center;
}

/* Portal */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.portal-header h1 {
    font-size: 20px;
    color: #38bdf8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

#user-display {
    color: #94a3b8;
    font-size: 14px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    padding: 40px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.app-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.app-card:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.app-card .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.app-card .name {
    font-size: 16px;
    font-weight: 600;
}

.app-card .desc {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 8px;
}

.app-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.btn-launch { background: #38bdf8; color: #0f172a; font-weight: 600; }
.btn-launch:hover { background: #7dd3fc; }

.btn-download { background: #334155; color: #e2e8f0; }
.btn-download:hover { background: #475569; }

/* Remote App Display */
.app-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

#guac-display {
    width: 100%;
    height: calc(100vh - 45px);
    overflow: hidden;
    background: #000;
}

#guac-display canvas {
    cursor: default;
}
